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

api: introduce llhttp_set_lenient_keep_alive #94

Closed
wants to merge 1 commit into from

Conversation

indutny
Copy link
Member

@indutny indutny commented Mar 27, 2021

Extra request/response after Connection: close should be either
discarded (in loose mode), or produce error (in strict mode). However,
to support legacy client we introduce:

  • llhttp_set_lenient_keep_alive

API call to process the extra request normally. Note that it opens the
server to potential cache poisoning attacks and is dangerous to
enable in the most of situations.

@indutny
Copy link
Member Author

indutny commented Mar 27, 2021

cc @nodejs/http a review would be appreciated.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm on the approach

Extra request/response after `Connection: close` should be either
discarded (in loose mode), or produce error (in strict mode). However,
to support legacy client we introduce:

* `llhttp_set_lenient_keep_alive`

API call to process the extra request normally. Note that it opens the
server to potential cache poisoning attacks and is dangerous to
enable in the most of situations.
@indutny
Copy link
Member Author

indutny commented Mar 27, 2021

Had to force push because of the duplicate test 🤦 Thanks @mcollina for review. Will land once CI is clear.

indutny added a commit that referenced this pull request Mar 27, 2021
Extra request/response after `Connection: close` should be either
discarded (in loose mode), or produce error (in strict mode). However,
to support legacy client we introduce:

* `llhttp_set_lenient_keep_alive`

API call to process the extra request normally. Note that it opens the
server to potential cache poisoning attacks and is dangerous to
enable in the most of situations.

PR-URL: #94
Reviewed-By: Matteo Collina <[email protected]>
@indutny
Copy link
Member Author

indutny commented Mar 27, 2021

Landed in cc5adf3. Thank you! I'll do a release once #93 lands as well.

@indutny indutny closed this Mar 27, 2021
@indutny indutny deleted the feature/lenient-keep-alive branch March 27, 2021 21:11
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