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

removing extra CRLF at the start of buffer before passing it to parse_headers #175

Merged
merged 1 commit into from
Apr 7, 2015
Merged

Conversation

arashbm
Copy link
Contributor

@arashbm arashbm commented Mar 14, 2015

a <<"\r\b">> at the beginning of the buffer passed to parse_headers/1 prevented parser from correctly parsing headers. It is correctly deleted when handling responses. (see line 194 of src/hackney_lib/hackney_http.erl)

a `<<"\r\b">>` at the beginning of the buffer passed to `parse_headers/1` prevented parser to correctly parsing headers. It is correctly deleted when handling response headers (in line 194).
@benoitc
Copy link
Owner

benoitc commented Mar 16, 2015

Patch looks good. Do you have any code that could help to test it? Eventually some eunit that we could add?

@arashbm
Copy link
Contributor Author

arashbm commented Mar 16, 2015

I'll write some tests. Since submitting this patch I fixed another bug in parsing requests on a presistant connection. I will add a bunch of tests for both these cases in test/hackney_http_tests.erl.

@benoitc
Copy link
Owner

benoitc commented Mar 20, 2015

ca you send me a PR with the changes above. Maybe we could add your patches in the coming release today?

benoitc referenced this pull request Mar 23, 2015
benoitc added a commit that referenced this pull request Apr 7, 2015
removing extra CRLF at the start of buffer before passing it to `parse_headers`
@benoitc benoitc merged commit 48bb71d into benoitc:master Apr 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants