Skip to content

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 indutny force-pushed the feature/lenient-keep-alive branch from 5ae6adb to 6467a62 Compare March 27, 2021 19:03
@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
elijah-charbel added a commit to elijah-charbel/llhttp that referenced this pull request Jul 29, 2025
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: nodejs/llhttp#94
Reviewed-By: Matteo Collina <[email protected]>
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