httpclient icon indicating copy to clipboard operation
httpclient copied to clipboard

Some servers have spaces in empty lines, triggering an error parsing unl...

Open lirm opened this issue 11 years ago • 3 comments

...ess stripped

lirm avatar Jan 28 '14 05:01 lirm

Hiroshi Nakamura » httpclient #104 SUCCESS This pull request looks good (what's this?)

buildhive avatar Jan 28 '14 05:01 buildhive

Sorry for late response.

Interesting... Can I access the server, or can you provide captured response from the server?

nahi avatar May 21 '14 11:05 nahi

Hi, @nahi!

We're facing the the same error (using httpclient 2.8.x).

I've patched #parse_header method (https://github.com/palkan/httpclient/commit/cb2a3a91d834197d0aa9745cc8c1fe48b7e6d197) to raise a meaningful errors and it looks like it doesn't depend on the target server, more likely depends on network conditions.

Example errors:

Pusher::HTTPError: unexpected line: (size 2)

Faraday::ClientError: unexpected line: (size 2)

It looks like an empty line but has a size of 2. Do you have any idea?

UPD: maybe, the problem is somehow related to Sidekiq and it's multi-threading.

palkan avatar Feb 10 '17 09:02 palkan