[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-win32-web
Subject: RE: OK - why doesn't BinaryWrite work here
From: Mike Trinder <mike.trinder () millerhare ! com>
Date: 2000-11-24 11:55:33
[Download RAW message or body]
> From: Mike Trinder
> Sent: 24 November 2000 11:37 am
> To: 'perl-win32-web@listserv.ActiveState.com'
> Subject: OK - why doesn't BimaryWrite work here
>
>
> I need to open a HTTP connection to a local machine, get the
> response data (a JPEG image) and then pass that on to the client
> - this is necessary as (1) the images are stored on a computer
> that is not visible publically and (2) I need to check that the
> client is authorised to see a particular image before returning
> it.
[snip]
> This doesn't work at all - I get a zero byte content-length:
>
> <%@ Language=PerlScript %><%
>
>
> use Win32::Internet;
> use Win32::OLE;
>
> $Connection = Win32::Internet->new();
>
> $Response->{Buffer} = 1;
> $Response->Clear;
> $Response->{ContentType} = 'image/jpeg';
>
> $file =
> $Connection->FetchURL('http://an.IP.addr.ess/lib/foo.jpg');
> $Response->BinaryWrite(Win32::OLE::Variant->new(
> VT_UI1, $file ));
>
> $Response->End;
>
> %>
OK - why is it as soon as you post a problem, you work out
what was wrong. That should be use Win32::OLE::Variant; there,
upon which we get a response, but it is still too short and
badly mangled. Anyone know anything about how Win32::Internet
functions in PerlScript in an ASP page?
Mike Trinder
_______________________________________________
Perl-Win32-Web mailing list
Perl-Win32-Web@listserv.ActiveState.com
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic