Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Feb : Re: IdHttp: improper range header field?
| Subject: | Re: IdHttp: improper range header field? |
| Posted by: | "Don Siders" (nano..@joesgarage.org) |
| Date: | Wed, 16 Feb 2005 08:20:41 |
>> using TIdHttp, it is my understanding that
>> Request.ContentRangeStart/End should be used
>> for download resuming.
>> According to RFC2616, section 14.35.2 "Range Retrieval
>> Requests", this should be a "Range" http header field instead.
>> And its syntax should be rather "bytes=0-500" instead of
>> "bytes 0-500".
> What you're indicating is that TIdRequestHeaderInfo has the wrong
> HTTP header (should be 'range:' for a request and not 'content-range:'
> used in a response). Correct?
A modified TIdRequestHeaderInfo has been checked into the version control server. You can download from TC or wait for it to propogate to one of the mirrors. It restores the Range property and ensures its use in AssignTo, Clear, SetHeaders, and ProcessHeaders.
When setting the Range property value, omit the 'bytes=' part of the header (it's added/removed automatically in SetHeaders/ProcessHeaders) the same as ContentRange 'bytes ' in responses. For example:
AHttp.Request.Range := '0-8191,8192-16383';
hth...