curl-library
Re: [PATCH] allows curl to be able to send the custom headers with empty value.
Date: Mon, 5 Sep 2011 08:33:50 -0700
On Mon, Sep 05, 2011 at 04:23:52PM +0900, warp kawada wrote:
> I think I understand what you said.
> But I don't know what should I do specifically.
> My additional codes expect its header does not have colon.
> Please tell me your logic.
The current patch will accept two forms of headers:
"X-Custom-Header;" and "X-Custom-Header; custom content", whereas it's only
the first one that we're really interested in. My thinking is that in the
future, we may want to extend curl to support another magic header form
in the same way as the magic sequence to allow a blank header. For example,
we may want to allow curl to magically URL encode the header contents, in
which case using a semicolon like this "X-Custom-Header; URL/encode&send"
could be the trigger for that new behaviour. But, if that form causes the
header contents to be dropped because of this patch, we won't be able
to use it to provide new behaviour later because it would break backward
compatibility.
Since the second form doesn't really even make much sense to use to trigger
header data removal, and since it could be used for something else in the
future, my suggestion is to trigger header data removal only if the
semicolon comes at the end of the string, i.e. the first form above.
>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-09-05