cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

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

On Thu, 25 Aug 2011, warp.kawada_at_gmail.com 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
destroyed.

> + 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.

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