-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Unexpected HTTP 431 response #33692
Comments
@cescoffier @vietj is this expected behavior? |
it might be a change / protection added in Netty ? can we get a vertx reproducer ? |
Reproducer: http : https://github.com/floone/vertx-reproduce431 Based on io.vertx.example.core.http2.simple.Server |
@floone Thanks for the reproducer! |
what used to be the vertx version that makes it pass ? |
it is related to HTTP/2 settings which controls what the client can send (the default value is 8192), if I modify the reproducer and use:
Then I get 200 response. It might be due to this change eclipse-vertx/vert.x@ed9db7f in 4.2.3 You might want to configure this value with an higher value, perhaps Vert.x default value should be increased too. |
Thank you for the investigation @vietj! From a user perspective, we did not opt-in http/2, and we did not configure it explicitly so far. However, it is enabled by default in Quarkus [1], and our issue popped up because on our new openshift cluster, http/2 is enabled while it was not enabled on the old environment. There is a section about http limits in the docs [2], but not specifically for http/2. I don't know (yet) how Quarkus and vertx play together, but I would have assumed that certain values are propagated downstream? I.e. if I set Is this just a documentation issue? From my perspective, it would make sense when the default of 20k would hold for all http flavours. What do you think? [1] https://quarkus.io/guides/http-reference#http2-support |
Yes, HTTP/2 is now enabled on Openshift (finally!). So, yes, it's a documentation issue. I will have a look. |
@cescoffier Thank you, much appreciated. If I understand correctly, the default values still differ (20k vs. 8k), but at least it is documented and can be configured consistently 👍 |
Yes, we cannot reuse the value because it's not really the same thing. But now you can configure them. |
This config isn't working for me https://quarkus.io/guides/http-reference#http-limits-configuration (Quarkus version 3.4). This is what I had to do to add a custom option. https://quarkus.io/guides/rest-client-reactive#use-custom-http-options
|
Can you open another issue? Something might be wrong in the config processing. |
Describe the bug
Unexpected HTTP 431 response
When requesting resources via HTTPS, unexpected HTTP 431 (Request header fields too large) are returned. We observe this on production after migration to a managed openshift environment. The very same service worked as expected on the old environment.
We can reproduce it with curl. When the total request size is more than 7966 bytes (according to curl), a 431 ist returned instead of a 200.
According to our tests:
We see the error appeared only after the migration. We assume the new environment attaches more or different headers. On production we use a redhat build of Quarkus 2.13, however, it can be reproduced using 3.0.4.Final.
It seems to happen only when using HTTPS, and only with HTTP/2.
As a workaround, we disabled HTTP/2 using quarkus configuration:
Expected behavior
A HTTP 200 is returned
Actual behavior
A HTTP 431 is returned
How to Reproduce?
Use a plain quarkus app:
Configure https:
application.properties:
Request a resource via https.
If total bytes sent > 7966, a http 431 is returned:
However, it works (= HTTP 200) with https/http 1.1:
It works (= HTTP 200) with plain http as well:
Output of
uname -a
orver
Linux 4.18.0-477.10.1.el8_8.x86_64 #1 SMP Wed Apr 5 13:35:01 EDT 2023 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "11.0.19" 2023-04-18 LTS
GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.0.4.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39)
Additional information
No response
The text was updated successfully, but these errors were encountered: