curl-library
Re: CURLOPT_RANGE -> chunks -> how to remove MIME-Header-Foo ?
Date: Tue, 14 Jun 2011 13:17:04 +0200 (CEST)
On Tue, 14 Jun 2011, Rieker Flaik wrote:
> But if it succeeds with the server to download chunk by chunk (for
> example first 5 bytes then the rest)
But why would you ask for such a range in the first place? That seems utterly
pointless.
> - it is "using standard MIME separation techniques" which means it adds a
> kind of header to every chunk.
Yes, if you ask for more than one range the server will send you the ranges
using MIME separation.
> But I don't want and need this! Or should I?
If you don't want it, then don't ask for it.
> What is the best way to strip this MIME-Header-Foo off?
By using a MIME parser!
> Just remove the first 8 lines of every chunk?
Please don't call them "chunks" as in HTTP lingo that's something completely
different. MIME separators come in the style:
> --4a5a936502fad6bcc
> Content-type: text/xml;charset=iso-8859-1
> Content-range: bytes 0-5/2463
>
So if you want to filter them out so skip the separators, the following
headers and the CRLF separator between the headers and the actual content.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2011-06-14