anlutro / php-curl

Simple PHP curl wrapper class

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handling of HTTP 100 Continue responses

anlutro opened this issue · comments

As a followup to #25, I'm wondering what the best way to handle HTTP 100 Continue responses is.

A response may look like this:

HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 42

abcdefghijklmnoprstuvwxyz1234567890abcdef

What is the "actual" response here? Should the 100 Continue header just be ignored?

Yes.

It's from w3c rfc:
- An origin server that sends a 100 (Continue) response MUST
ultimately send a final status code, once the request body is
received and processed, unless it terminates the transport
connection prematurely.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html

Interestingly, I can't see that Guzzle handles this case.

I think this can be made as a bugfix release.