Skip to content

bugfix: first part headers will be discard when using single LF as delimiter #1204

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

Closed
wants to merge 1 commit into from
Closed

bugfix: first part headers will be discard when using single LF as delimiter #1204

wants to merge 1 commit into from

Conversation

tokers
Copy link
Contributor

@tokers tokers commented Dec 4, 2017

I hereby granted the copyright of the changes in this pull request
to the authors of this lua-nginx-module project.

When the delimiter is the single LF and the request has large headers, ngx.req.raw_header will discard the first part headers.

@agentzh
Copy link
Member

agentzh commented Dec 4, 2017

@spacewander Will you have a look at this? Thanks!




=== TEST 30: large headers(using single LF as linefeed)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to use line break instead of linefeed, since linefeed may be confused with LF.

=== TEST 30: large headers(using single LF as linefeed)
--- config
location /t {
content_by_lua '
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New test cases should use content_by_lua_block instead.

@tokers
Copy link
Contributor Author

tokers commented Dec 5, 2017

@spacewander @agentzh The code has been updated.

@tokers
Copy link
Contributor Author

tokers commented Dec 23, 2017

@agentzh @spacewander ping. Any plan for this?

@agentzh
Copy link
Member

agentzh commented Dec 25, 2017

@tokers Will have a look at this.




=== TEST 31: large headers without request line(using single LF as line break)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better add a space before ( for aesthetic reasons.




=== TEST 32: large headers with leading CRLF(using single LF as line break)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.




=== TEST 30: large headers(using single LF as line break)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like below.




=== TEST 33: large headers without request line but contains leading CRLF(using single LF as line break)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

@agentzh
Copy link
Member

agentzh commented Jan 2, 2018

@tokers Merged with fixes for the aforementioned minor issues. Thanks!

@agentzh agentzh closed this Jan 2, 2018
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.

3 participants