cURL / Mailing Lists / curl-library / Single Mail


Re: Response head is not retrievable

From: Daniel Stenberg <>
Date: Thu, 3 Apr 2008 21:47:42 +0200 (CEST)

On Thu, 3 Apr 2008, Nikolai Kondrashov wrote:

> sepheaders.c does a different thing.

I know it does, but I noticed it worked and thus something in that area is at
least right.

> After experimenting a little with both sepheaders.c and my demo code I now
> seem to understand what's happening. It seems that if no custom header
> writing function is specified with CURLOPT_HEADERFUNCTION, the data writing
> function is used in its place, either default or specified with
> CURLOPT_WRITEFUNCTION. So in my demo code the headers got fed to my
> discarding function.

Ah yes, that's how it works. It's not really very nice, but we've left it like
that since it once worked like that and we've never bothered to break
backwards compatiblity in that area since. But I'll admit I haven't really
thought about that design choice in a long while.

> However, the described behaviour is not documented and that's why I was
> puzzled by it. I could fix the documentation, though. Where could I send
> patches?

Please make patches with diff -u and post them to this very list!

  Commercial curl and libcurl Technical Support:
Received on 2008-04-03