Generally speaking, LWP does not care about the actual content or format, it simply passes on to the web server what kind of content encoding you are willing to accept, in the form of properly formatted request headers.

The web server should pay attention to this and either send data in an appropriate format/encoding (as indicated by the response headers) or inform you that it can't comply with your requirements. You may request documents in 9 bit Morse encoding compressed with a proprietary Javascript library but the server is free to say no. What the server should not do is send you data in an imaginary format when you clearly stated what you were willing to accept.

LWP has some convenience features that can help you with decoding of some common well-known encoding types but other than that you are free to take the binary content and decode it any way you like, which hopefully matches what the server indicated.

In this particular case, you may want to look at modules that deal with MIME content unless I'm very much mistaken.

-- FloydATC

Time flies when you don't know what you're doing


In reply to Re: Perl LWP Can handle client-transfer-encoding = chunked encoding? by FloydATC
in thread Perl LWP Can handle client-transfer-encoding = chunked encoding? by sam_bakki

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.