cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: 转发: About headers with no contents.

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 2 Apr 2012 15:00:40 +0200

On Mon, Apr 02, 2012 at 08:46:41AM -0400, Jason Liu wrote:
> I want to send a request with headers like "Empty-header:".
> But libcurl can only send this header like "Empty-header:""". Many sites don't consider this header right and return 400.
>
> So how can I send as "Empty-header:"?

Since version 7.23.0, you can send an empty header by changing the colon to
a semicolon, i.e. Empty-header; is converted and sent as Empty-header:

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-04-02