in reply to CrLf getting inserted into an octet-stream (gzip file)
You want to use binmode when writing binary content.
You could also let LWP::UserAgent store the response content to disk directly, depending on your needs:
$ua->post( ':content_file' => $filename, ... );
or, if this is an exercise to send the file to a client, give quicker feedback through a callback (but here you still have to binmode STDOUT):
$ua->post( ':content_callback' => sub { print $_[0] }, ... );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: CrLf getting inserted into an octet-stream (gzip file)
by Rumtis (Initiate) on May 23, 2008 at 17:11 UTC | |
by Corion (Patriarch) on May 23, 2008 at 17:16 UTC | |
by Rumtis (Initiate) on May 23, 2008 at 17:30 UTC | |
by MidLifeXis (Monsignor) on May 24, 2008 at 13:27 UTC | |
by Rumtis (Initiate) on May 27, 2008 at 14:45 UTC |