Re: HttpWebResponse Transfer-Encoding chunked - how to read trailers?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi Jacek,

thanks for you're note. I should be in the "Trailer" field of the
HttpResponseHeader. Did I mension that it's only .Net 2.0 ;)

Hope that helps,
Markus


"Jacek" <shield_infodate@xxxxxxxx> schrieb im Newsbeitrag
news:uVkYydt5FHA.3296@xxxxxxxxxxxxxxxxxxxxxxx
> But its not true since we are talking about internal chunked encoding
> trailer headers which are not part of standard HTTP 1.1 headers. They are
> embedded inside a chunk at its very end. Just check following link to get
> closer idea what I mean about trailer in chunk:
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6 and perhaps
> appendix 19.4.6 of RFC 2616 to see pseudo code for parsing this data.
>
> Simplest example of www pages served with chunked encoding are exotic eBay
> sites i.e. China or India. Unfortunately changing protocol version to HTTP
> 1.0 does not solve problem (chunked is not supported there) since almost
> all servers I work with despite dropping chunked encoding do not set
> Content-Length header anyway.
>
> Cheers
>
>
> U¿ytkownik "Markus Kling" <markus.kling@xxxxxxxxxxxxx> napisa³ w
> wiadomo¶ci news:%23yRNzXs5FHA.3544@xxxxxxxxxxxxxxxxxxxxxxx
>> The information should be contained in the Header object in the field
>> "Trailer". See
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/act/htm/actml_ref_href.asp
>> for further details.
>>
>> Markus
>>
>>
>> "Jacek" <shield_infodate@xxxxxxxx> schrieb im Newsbeitrag
>> news:eiye67r5FHA.3432@xxxxxxxxxxxxxxxxxxxxxxx
>>> Hi!
>>>
>>> My app does quite a bit of work downloading large chunks of data from
>>> different web servers. One of problems I face is to provide approximate
>>> progress reports to users showing download progress. While task is
>>> trivial when web servers set Content-Length header in response its
>>> getting to be really hard when server uses chunked encoding. The only
>>> way according to HTTP 1.1 RFC 2616 to get info on total size of the
>>> chunked message is to read optional TRAILER containing entity header
>>> fields (my solution anyway would be optional).
>>>
>>> The problem is that I see no ways to access chunked header or TRAILER in
>>> .NET other than implementing my own HTTP classes on top of Net Sockets
>>> :(
>>>
>>> Any ideas how to get it done easy way ?
>>>
>>> cheers
>>>
>>
>>
>
>


.



Relevant Pages

  • Re: Interchange pipeline failure
    ... The problem is not that I can't make a schema, ... the header and trailer have tags. ... It appears not to be able to process the trailer, ... The document schema has 1 record but no tag identifier, ...
    (microsoft.public.biztalk.general)
  • Re: Interchange pipeline failure
    ... There's an example in my original post that includes the header, ... The problem is not that I can't make a schema, ... It appears not to be able to process the trailer, ... The document schema has 1 record but no tag identifier, ...
    (microsoft.public.biztalk.general)
  • Re: Importing a text file
    ... The header, of course should be the first record, and is the ... Trailer likewise is the last record. ... and assigning the counter value to RecNum for each record. ...
    (comp.lang.basic.visual.misc)
  • Re: Import TXT file into Access
    ... The problem is that the header and trailer is ... If there is a non-standard row in the text file at the beginning or the end ... data or you need to write a custom VBA procedure to do the import and parsing ...
    (microsoft.public.access.gettingstarted)
  • Re: Flat file assembler
    ... You can define one schema with header, body and trailer elements. ... You can create separate a header schema, ... These are specified in on the FFDasm component of a custom pipeline. ...
    (microsoft.public.biztalk.general)