cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] allows curl to be able to send the custom headers with empty value.

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 8 Sep 2011 14:42:36 -0700

On Wed, Sep 07, 2011 at 10:34:22AM +0900, warp kawada wrote:
> 2011/9/7 Dan Fandrich <dan_at_coneharvesters.com>:
> > I think you want this whole patch to be in an 'else' block
> > here. Otherwise, a header like "X-Test: foo; " would be sent twice; once
> > as a normal header and once as an empty header (with the semicolon converted
> > to a colon). That would actually a good case to add to the test suite.
>
> I'm sorry. You are right.
> I've updated my patch.

Looks good to me! It would be a good idea to add a couple more headers to
the test case to validate correct handling of the end of line, such as:

"X-Test2: foo;" (normal header ending in semicolon w/o trailing space)
"X-Test3; " (ending in semicolon with trailing space)

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-09-08