For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > December 2005 > Problem with requesting a binary file with activeperl in windows









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Problem with requesting a binary file with activeperl in windows
remgenesis

2005-12-18, 3:37 pm

I use the following lines to request a binary file in a website

my $ua = new LWP::UserAgent("keep_alive"=>3);
my $request = new HTTP::Request('GET', $url);
my $response = $ua->request($request)

But it seems activeperl treats the file as a text file instead of a binary one.
This is not problem when in linux. But in windows, it added a CR (13) byte before each LF(10) byte.
So the binary file was corrupted.

How to avoid this in windows?
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com