Title: gh-54930: Send a status line in error responses to malformed request lines by serhiy-storchaka · Pull Request #152980 · python/cpython · GitHub
Open Graph Title: gh-54930: Send a status line in error responses to malformed request lines by serhiy-storchaka · Pull Request #152980 · python/cpython
X Title: gh-54930: Send a status line in error responses to malformed request lines by serhiy-storchaka · Pull Request #152980 · python/cpython
Description: Previously, if the request line could not be parsed (malformed or unsupported version, bad syntax, or a non-GET two-word request), the error response was sent in the bare HTTP/0.9 style, without a status line and headers, because the request version defaulted to "HTTP/0.9". The client received raw HTML and could not see the 400 or 505 status. Now only a valid HTTP/0.9 request (a two-word GET request line) receives an HTTP/0.9 style response. The other defect discussed in the issue (deadlock on a one-line HTTP/0.9 request) was fixed in gh-70765. The test suite previously worked around the present defect by setting default_request_version = 'HTTP/1.1' in its test handlers. 🤖 Generated with Claude Code Issue: gh-54930
Open Graph Description: Previously, if the request line could not be parsed (malformed or unsupported version, bad syntax, or a non-GET two-word request), the error response was sent in the bare HTTP/0.9 style, without a ...
X Description: Previously, if the request line could not be parsed (malformed or unsupported version, bad syntax, or a non-GET two-word request), the error response was sent in the bare HTTP/0.9 style, without a ...
Opengraph URL: https://github.com/python/cpython/pull/152980
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:4c3fa229-23ea-0478-5760-eb844d515ed1 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | ABE0:E21C4:12D5B53:197AC2C:6A4F1374 |
| html-safe-nonce | c94f478dc11678196a9f4482dd6e030e26eebb386b921c8dde164584fb492712 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkUwOkUyMUM0OjEyRDVCNTM6MTk3QUMyQzo2QTRGMTM3NCIsInZpc2l0b3JfaWQiOiI5MTk1ODg5NjMzODMyOTMyMjEyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3b678c7b6dd53ae1281baa0d0a5b94e2c18d9de51e1ee3ec0ceb4b28b2db0b97 |
| hovercard-subject-tag | pull_request:3988247235 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/152980/files |
| twitter:image | https://avatars.githubusercontent.com/u/3659035?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/3659035?s=400&v=4 |
| og:image:alt | Previously, if the request line could not be parsed (malformed or unsupported version, bad syntax, or a non-GET two-word request), the error response was sent in the bare HTTP/0.9 style, without a ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b8f23afb982271f1b22258a94aede67a6b77760 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width