the example in my previous port is wrong, should have been:
"""
c = pycurl.Curl()
c.setopt(pycurl.HTTPHEADER, ['User-Agent:
PyCurlrnEmptyHeader:'])
...
"""
HTTPHEADER assumes a list as argument, not a string. sorry
about that.
- kjetil
On 5/25/07, Kjetil Jacobsen <kjetilja gmail.com> wrote:
> 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:
PyCurlrnEmptyHeader:')
> ...
> """
>
> regards,
> - kjetil
>
> On 5/25/07, Frédéric PICA <frederic.pica 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-an
d-python
> >
> >
>
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-an
d-python
|