Code Comments
Programming Forum and web based access to our favorite programming groups.POE::Component::Client::HTTP quietly decodes HTTP::Response content before passing the object back to application code. It does so for the convenience of application programmers who just want to deal with HTML. This is not always the right thing to do. For example, downloaded .gz files will be saved to disk uncompressed because the content is silently uncompressed. Gisle Aas explains why transparent decoding in library space can be bad: http://www.mail-archive.com/libwww@...g/msg04703.html (among other places). So I'm thinking about removing it, and forcing the application programmer to use decoded_content() explicitly if they need it. This would break programs that rely on the transparent decoding, so I'm considering doing it in stages: 1a. Only decode content for text/* that is gzip encoded. All other content would be passed through unchanged. 1b. Add a new option to do transparent decoding, and leave it on by default. 2. Later, throw a warning if the option is turned on. Remind the application developer to use decoded_content() if they want decoded content. 3. Later, throw a hard error (and reminder) at the developer if the option is enabled. 4. Later, remove the transparent decoding feature and option altogether. -- Rocco Caputo - rcaputo@pobox.com
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.