brianmario / streamly

A streaming REST client for Ruby, using libcurl
MIT License
106 stars 3 forks source link

Truncated headers #3

Open Sephi-Chan opened 13 years ago

Sephi-Chan commented 13 years ago

Hi,

I'm writing a client for BeaconPush using Streamly and I encounter an issue with headers.

In my code, I have:

headers = { 'X-Beacon-Secret-Key' => 'Some secret key', 'foo' => 'bar' }
Streamly.post("#{base_url}/channels/#{channel}", JSON.dump(data), headers)

The request worked well but the response was:

{"status": 400, "message": "No secret key supplied. Use header 'X-Beacon-Secret-Key' to supply it."}

So I investigated and found that my custom headers were truncated:

fo: bar
Accept: */*
Content-Type: application/x-www-form-urlencoded
X-: acon-Secret-Key
Accept-Encoding: identity, deflate, gzip
Content-Length: 24
Host: api.beaconpush.com

I really like Streamly API so I hope there is a fix for that. ;)

Sephi-Chan commented 13 years ago

Ping ?