-
-
Notifications
You must be signed in to change notification settings - Fork 735
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
Gracefully handle HTTP/2 upgrade request #1501
Comments
interesting, low priority but something to consider |
I don't agree with the "low priority" assessment. This is a blatant violation of the http specification and more and more (standards compliant) http clients break just by using them with their default settings. |
PR welcome. |
The existence of a PR has nothing to do with the priority assessment. In fact, giving this issue a higher priority may incentivize people to actually fix this issue. Saying that this violation of the http spec is "low prio" is more a statement about the level of professionalism of this software, or the lack thereof. For the record: Yes, I would try to fix this myself, but you have to realize that not every user of your product is a software developer that uses the language that your software is written in. I am fluent in Java and Go, but I cannot fix python code. Or at least not at a level that you would ever consider to accept contributions. |
Locking the issue as I'm not liking the tone of the reporter. PR is still welcome. 🙏 If no one implements it, I will, at some point, on my free time (unpaid free time). |
omg, happy to come back to see your fluency in being a total asshat @ChristianCiach |
It will be available on uvicorn |
I know that HTTP/2 is out of scope of this project. But I am not asking to support HTTP/2.
More and more http clients try to upgrade the connection to HTTP/2. Uvicorn is free to not honor this request. Unfortunately, instead of ignoring the upgrade request, Uvicorn responds with status
400 Bad Request
and the message "Unsupported upgrade request".According to https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism the server should just ignore the upgrade request:
We continue to encounter this issue because the
HttpClient
class of modern OpenJDK versions tries to upgrade the connection to HTTP/2 by default. Uvicorn should just ignore these headers and process the requests as if these headers were not present.The text was updated successfully, but these errors were encountered: