curl-library
RE: How to detect missing Content-Length response header?
Date: Mon, 23 Feb 2009 09:28:37 -0800
Retuning -1 would make sense to me. There is also CURLE_GOT_NOTHING, but I don't know if there's precendent for that.
-James
> -----Original Message-----
> From: curl-library-bounces_at_cool.haxx.se
> [mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of
> Daniel Stenberg
> Sent: Monday, February 23, 2009 8:32 AM
> To: libcurl development
> Subject: Re: How to detect missing Content-Length response header?
>
> On Fri, 20 Feb 2009, Daniel Stenberg wrote:
>
> >> to detect Content-Length actually being 0, vs the
> Content-Length header not
> >> being sent.
> >
> > Oh indeed. I consider that a bug. How would you prefer it to act?
>
> Okay then, may I suggest that it returns a -1 if the size is
> unknown? Having
> the function return an error is also possible, but that feels
> wrong to me
> since the function doesn't actually fail, it just can't
> return a proper
> size...
>
> --
>
> / daniel.haxx.se
>
Received on 2009-02-23