Skip to content

Invalid "Expect" header #18

Closed
Closed
@fyfey

Description

@fyfey

I would like to add the ability to handle a 100-continue status from the server as I just hit a bug where I would get the following response:

HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Date: Tue, 08 Mar 2016 10:34:43 GMT
Server: Apache/2.2.22 (Debian)
X-Powered-By: PHP/5.4.45-0+deb7u2
etc

It gets the initial header line and then throws an exception parsing HTTP/1.1 200 OK as a header due to the missing colon.

I fixed it by setting an empty "Expect" header. Somewhere an "Expect 100-continue" was being added to my request (I wasn't explicitly setting this).

Could we check the initial status line for this status, and then discard the first 2 lines and resume parsing the actual response?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions