curl-and-python

Re: Sending a header with exactly no contents

From: Kjetil Jacobsen <kjetilja_at_gmail.com>
Date: Fri, 25 May 2007 10:23:34 +0200

hi,

this does not appear to be supported by libcurl, see:

http://curl.haxx.se/mail/lib-2006-01/0244.html

one of the hacks mentioned in that thread is to embed the empty header
in another header, e.g.:

"""
c = pycurl.Curl()
c.setopt(pycurl.HTTPHEADER, 'User-Agent: PyCurl\r\nEmptyHeader:')
...
"""

regards,
    - kjetil

On 5/25/07, Frédéric PICA <frederic.pica_at_gmail.com> wrote:
> Hi,
>
> I need to send an header with exacly no contents like that:
> X-Header:
>
> I've tried using double quotes like
> "X-Header:" or X-Header: ""
>
> curl sends me the header with the double quotes but for the server it
> doesn't work, it needs exactly X-Header:
> with nothing after ':'
>
> Regards,
> FP
>
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
>
>
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2007-05-25