in reply to Re^4: Zip file from WWW::Mechanize
in thread Zip file from WWW::Mechanize
$ perl -MEncode -e'printf "%04X\n", ord decode "UTF-8", "\357\277\275" +' FFFD
It sounds like something tried to decode the zip file.
$ perl -MEncode -we'print decode "UTF-8", "\215"' | od -c Wide character in print at -e line 1. 0000000 357 277 275 0000003
While WWW::Mechanize's content calls decoded_content (defined in HTTP::Message), decoded_content shouldn't attempt to decode a zip file (only files with MIME type text/*).
Is the web server incorrectly saying the .zip is a UTF-8 text file? Could you provide the output of the following:
print $mech->response()->headers()->as_string();
Delete "Set-Cookie:" headers and other authentication data before posting.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Zip file from WWW::Mechanize
by jck000 (Novice) on Mar 23, 2009 at 21:46 UTC | |
by ikegami (Patriarch) on Mar 23, 2009 at 22:47 UTC | |
by jck000 (Novice) on Mar 23, 2009 at 23:33 UTC |