Skip to content

Fix serving Bad request pages in case of some HTTP errors #4506

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

Merged
merged 1 commit into from
Apr 15, 2025

Conversation

Discookie
Copy link
Contributor

When a request fails very early inside http.server's parse_request, the headers attribute might not exist yet. This makes requests fail in some cases where eg. the HTTP header is corrupted for some reason, instead of returning a graceful Bad request page.

This is a partial fix for issue #4449.

When a request fails very early inside http.server's parse_request, the headers attribute might not exist yet. This makes requests fail in some cases where eg. the HTTP header is corrupted for some reason, instead of returning a graceful Bad request page.
Copy link
Member

@dkrupp dkrupp left a comment

Choose a reason for hiding this comment

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

LGTM

@dkrupp dkrupp merged commit 6a37553 into Ericsson:master Apr 15, 2025
8 checks passed
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