On Jun 22, 2:48 am, Kenneth Kalmer <
kenneth.kal...@gmail.com> wrote:
> Hi Todd and the list
>
> I'm experiencing some difficulties where my custom headers aren't sent along
> with PUT requests.
>
> I have the following invocation:
>
> c = Curl::Easy.new('
http://localhost:4567/workitems/20090617-jozusagiku/0_0_0")
> c.headers['Content-Type'] = "application/json"
> c.http_put( <arbitrary json string> )
>
> I thought I was going mad, but a quick tcpdump showed this is the fact:
>
> PUT /workitems/20090617-jozusagiku/0_0_0 HTTP/1.1
> Host:
127.0.0.1:4567
> Accept: */*
> Content-Length: 1420
Seems irb confirmed this as well, headers are getting munched:
=> #<Curl::Easy:0xb5d5cc84>
>> c.headers['Content-Type'] = 'application/json'
=> "application/json"
>> c.headers
=> {"Content-Type"=>"application/json"}
>> c.http_put( wi.to_json )
=> true
>> c.headers
=> "Expect:"
Best