-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Configure the header list size in jetty client to more than 8Kb #12071
Comments
What header are you wanting to send at over 8kb? If it's the |
Hi @joakime No, i want to send a custom header whose size will go beyond 8kb. |
I feel that would be very unfriendly to HPACK. |
@joakime Yes, I agree with it. |
Currently when I tried sending the header beyond 8Kb, I saw exceptions related to the same. So, I wanted to know if I can configure the jetty client such that the header can be sent without issues. |
Just as a remark: Kerberos/SPNEGO headers can get larger than that if the user is in many groups etc. |
Yup, and Microsoft specifically calls out Windows authentication (NTLM/Kerberos/Negotiate) as not supported on HTTP/2 due to HPACK performance issues that those large headers cause. |
Also, it would be great if you could tell me how can I configure the header size? |
The header size limits on HTTP/2 is determined by what the remote can handle. See https://datatracker.ietf.org/doc/html/rfc7540#section-11.3 The HEADER_TABLE_SIZE can be configured in Http2Client with both It is not recommended to use headers of this size, as it negates too many of the benefits of HTTP/2 (you will likely have worse performance on HTTP/2 than on HTTP/1 with headers of this size, something even grpc has discovered). Know that most HTTP/2 server implementations do not support headers over 4k total (as in all headers, not just a single one). Since you didn't share the logs or stacktrace or errors you are getting, we don't know where the problem is happening (Jetty client side, server error, http2 protocol error, WebClient error, etc). |
Hi @joakime This the exception that I was referring to earlier, please provide your inputs on it.
|
Seems that you received a HTTP/2 Settings frame that said the server can only support size 8192. Also, Jetty 11 is at End of Community Support. You should be using Jetty 12 at this point in time. |
Sure @joakime |
After configuring the remote server to allow more than 8Kb header size, I no longer see the exception. I was wondering what is the max header size jetty client can support when it receives big headers in response from server. Thanks!! |
@Niteshkumar152 on the client you want to configure the max response header size with Closing this issue as answered, please report back if it worked for you on the client too. |
jetty Version=11.0.20
Java Version = 17
I am using the http2 Client of Jetty(plain text).
Following is the code snipped of initializing the HTTP client:
I want to configure jetty client such that I can send headers greater than 8Kb in the request. Currently I believe this parameter is responsible for configuring the header size limit MAX_HEADER_LIST_SIZE.
Please suggest how I can configure MAX_HEADER_LIST_SIZE the way I am creating the client.
Thanks in Advance!
The text was updated successfully, but these errors were encountered: