cURL / Mailing Lists / curl-library / Single Mail

curl-library

Adding empty HTTP Headers to curl requests?

From: Cyrill Osterwalder <cyrill.osterwalder_at_seclutions.com>
Date: Thu, 26 Jan 2006 11:23:43 +0100

Hi

I'm wondering if libcurl supports adding empty HTTP headers to requests?
An empty HTTP header means a header that does not have a value after the
colon, e.g. ("EmptyHeader:").

As described in the documentation of curl_easy_setopt() the curl library
will discard emtpy headers from requests. Appending something like
"EmptyHeader:" will therefore not be successful. Looking at the source
code in add_custom_headers() it seems that no empty headers are possible
to be appended at all.

I'm currently looking at curl 7.14.0 but this might not have changed
since then.

Empty HTTP headers are imho legal according to RFC. They are used in
certain environments to indicate special things to back-end services.

Any suggestions how empty HTTP headers could/should be supported by
libcurl?

Best regards

Cyrill
Received on 2006-01-26