Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing HTTP Code according to RFC #73

Merged
merged 1 commit into from
Mar 5, 2013
Merged

Parsing HTTP Code according to RFC #73

merged 1 commit into from
Mar 5, 2013

Conversation

mishak87
Copy link
Contributor

@mishak87 mishak87 commented Mar 5, 2013

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
Copy link
Owner

nategood commented Mar 5, 2013

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.

None yet

2 participants