cURL / Mailing Lists / curl-library / Single Mail


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

From: Daniel Stenberg <>
Date: Fri, 26 Aug 2011 23:50:41 +0200 (CEST)

On Thu, 25 Aug 2011, wrote:

> If you would use this spec then its patch is below. How about this?

Your patch seems to have lost all whitespaces so it looks completely

> + ptr = strchr(headers->data, ';');
> + /* send non-value custom header if terminated by semicolon */

This looks for a semicolon _anywhere_ in a custom header, so a common thing
like "Content-Type: text/html; charset=utf8;" would match. The check needs to
be stricter. Possibly

       tok=strtok_r(header, ";:", &tok_buf);

... and check if 'tok' is non-NULL and points to a semicolon.

List admin:
Received on 2011-08-26