Skip to content

Parsing HTTP Code according to RFC - #73

Merged
nategood merged 1 commit into
nategood:masterfrom
mishak87:patch-4
Mar 5, 2013
Merged

nategood merged 1 commit into
nategood:masterfrom
mishak87:patch-4

Conversation

@mishak87

@mishak87 mishak87 commented Mar 5, 2013

Copy link
Copy Markdown
Contributor

I have encountered this error during testing mine apps communicating over HTTP.
Mine setup was Nginx + PHP 5.4.12 on Win.
On 500 response status was not parsed properly and Httpful threw an exception.

I still don't fully get how the http code parsing could work without this patch so I would appreciate if someone could revise the proposed change.
I can provide testing data for exception if necessary (don't have time right now).

OT: Anyhow I would expect from this library to take more simpler approach by checking for number till first space. (checking only for 500 instead of `500 Server Error...\n')

HTTP uses \r\n for new line

 - fixes error with some 500 responses
@nategood

nategood commented Mar 5, 2013

Copy link
Copy Markdown
Owner

I agree. That parsing method is overkill. Should just look for the first int. Merging in for now to accomodate the main issue for now.

nategood added a commit that referenced this pull request Mar 5, 2013
Parsing HTTP Code according to RFC
@nategood
nategood merged commit 8b24b79 into nategood:master Mar 5, 2013
@mishak87
mishak87 deleted the patch-4 branch March 11, 2013 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants