Skip to content

Increase HTTP header size limit in Netty-based HttpClients #45291

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

alzimmermsft
Copy link
Member

@alzimmermsft alzimmermsft commented May 12, 2025

Description

Increases Netty's max header size to accomadate headers that are larger than 8 KB. The initial draft of this PR is to increase this to 16 KB but continue hard coding it.

At this time there are four unique HTTP stacks supported, JDK HttpClient, Netty, OkHttp, and Vert.x, all with slightly different handling.

JDK HttpClient tracks the size of all HTTP headers processed, with a default size limit of 384 KB, and can be configured by modifying the system property jdk.http.maxHeaderSize. Changing this will affect behavior of the JDK HttpClient itself and usages of HttpURLConnection. We haven't seen any concerns with this, but modifying this behavior would affect more than just Azure SDK code.

Netty uses the behavior mentioned in this PR, with tracking the size of individual HTTP headers. The default limit is 8 KB and this can be configured by modifying the HttpDecoderConfig (as seen in this PR). Modifying this only changes the Netty HttpClient built, so should be safe to mutate as it only effect a single HttpClient.

OkHttp is the same as the JDK HttpClient, where it tracks all HTTP headers processed, but default to 256 KB and doesn't appear to be mutable. This could cause issues in the future if services return both many and large headers.

Vert.x is the same as Netty, where it tracks individual HTTP headers, uses the same default, and works on a per-HttpClient level. The only difference is this is a modification to HttpClientOptions.

Per Weidong's comment the Netty and Vert.x sections were wrong. They too work on the entire size of all HTTP headers processed. Default is still 8 KB and the way to configure them is still the same though. But given how restrictive the size is, 16 KB that is hardcoded in this PR is unlikely to be sufficient long term and exposing a configuration for this may be warranted.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@alzimmermsft alzimmermsft self-assigned this May 12, 2025
@Copilot Copilot AI review requested due to automatic review settings May 12, 2025 17:36
@alzimmermsft alzimmermsft requested a review from samvaity as a code owner May 12, 2025 17:36
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR increases the maximum HTTP header size in Netty-based HTTP clients (and related test servers) from 8 KB to 16 KB while keeping the value hard-coded. Key changes include updating HttpConfiguration in the test and server setups, adding max header size in Vert.x, Netty, and OkHttp builders, and revising tests to reflect the new header size limits.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
sdk/core/azure-core/src/test/java/com/azure/core/validation/http/LocalTestServer.java Updated HttpConfiguration to use a max header size of 16 KB.
sdk/core/azure-core/src/test/java/com/azure/core/validation/http/HttpClientTestsServer.java Revised endpoint constants and added the pathMatches helper for routing tests.
sdk/core/azure-core/src/test/java/com/azure/core/validation/http/HttpClientTests.java Updated tests to use RETURN_BYTES instead of EXPECTED_RETURN_BYTES and added tests for huge headers.
sdk/core/azure-core-http-vertx/src/main/java/com/azure/core/http/vertx/VertxHttpClientBuilder.java Set max header size in the HttpClientOptions to 16 KB.
sdk/core/azure-core-http-okhttp/* Minor improvements in builder method chaining and import adjustments.
sdk/core/azure-core-http-netty/* Integrated max header size into the Netty decoder configuration.
sdk/clientcore/* Similar updates for test servers and clients ensuring consistency with the increased header size.

@weidongxu-microsoft
Copy link
Member

weidongxu-microsoft commented May 13, 2025

Alan, from my test, the Netty one seems also the combined size.

(I've repurposed a local function to test -- httpbin does have response-header but it uses query to set, while the max URL length it allow is only 4K)

  const res: Response = {
    status: 200,
    headers: {
      "header1": "h"x3k,
      "header2": "h"x3k,
      "header3": "h"x3k,
    },
    jsonBody: {
      result: "",
    },
  };
  return res;
            HttpClient httpClient1 = HttpClient.createDefault();
            String url = "http://localhost:7071/api/github/pr";
            HttpResponse response1 = httpClient1.sendSync(new HttpRequest(HttpMethod.POST, url), Context.NONE);
            HttpHeaders headers = response1.getHeaders();

io.netty.handler.codec.http.TooLongHttpHeaderException: HTTP header is larger than 8192 bytes.

curl on it

14:50:33.085000 [0-0] <= Recv header, 17 bytes (0x11)
0000: HTTP/1.1 200 OK
14:50:33.085000 [0-0] == Info: [WRITE] cw_out, wrote 17 header bytes -> 17
14:50:33.085000 [0-0] == Info: [WRITE] download_write header(type=c, blen=17) -> 0
14:50:33.101000 [0-0] == Info: [WRITE] client_write(type=c, len=17) -> 0
14:50:33.101000 [0-0] <= Recv header, 32 bytes (0x20)
0000: Content-Type: application/json
14:50:33.101000 [0-0] == Info: [WRITE] header_collect pushed(type=1, len=32) -> 0
14:50:33.101000 [0-0] == Info: [WRITE] cw_out, wrote 32 header bytes -> 32
14:50:33.101000 [0-0] == Info: [WRITE] download_write header(type=4, blen=32) -> 0
14:50:33.101000 [0-0] == Info: [WRITE] client_write(type=4, len=32) -> 0
14:50:33.117000 [0-0] <= Recv header, 37 bytes (0x25)
0000: Date: Tue, 13 May 2025 06:50:32 GMT
14:50:33.117000 [0-0] == Info: [WRITE] header_collect pushed(type=1, len=37) -> 0
14:50:33.125000 [0-0] == Info: [WRITE] cw_out, wrote 37 header bytes -> 37
14:50:33.125000 [0-0] == Info: [WRITE] download_write header(type=4, blen=37) -> 0
14:50:33.132000 [0-0] == Info: [WRITE] client_write(type=4, len=37) -> 0
14:50:33.136000 [0-0] <= Recv header, 17 bytes (0x11)
0000: Server: Kestrel
14:50:33.136000 [0-0] == Info: [WRITE] header_collect pushed(type=1, len=17) -> 0
14:50:33.136000 [0-0] == Info: [WRITE] cw_out, wrote 17 header bytes -> 17
14:50:33.136000 [0-0] == Info: [WRITE] download_write header(type=4, blen=17) -> 0
14:50:33.148000 [0-0] == Info: [WRITE] client_write(type=4, len=17) -> 0
14:50:33.148000 [0-0] == Info: [WRITE] looking for transfer decoder: chunked
14:50:33.148000 [0-0] == Info: [WRITE] added transfer decoder chunked -> 0
14:50:33.148000 [0-0] <= Recv header, 28 bytes (0x1c)
0000: Transfer-Encoding: chunked
14:50:33.148000 [0-0] == Info: [WRITE] header_collect pushed(type=1, len=28) -> 0
14:50:33.163000 [0-0] == Info: [WRITE] cw_out, wrote 28 header bytes -> 28
14:50:33.163000 [0-0] == Info: [WRITE] download_write header(type=4, blen=28) -> 0
14:50:33.163000 [0-0] == Info: [WRITE] client_write(type=4, len=28) -> 0
14:50:33.163000 [0-0] <= Recv header, 3011 bytes (0xbc3)
0000: header1: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0040: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0080: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
00c0: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0100: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0140: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0180: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
01c0: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0200: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0240: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0280: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
02c0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40: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0a80: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0ac0: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0b00: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0b40: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0b80: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0bc0: h
14:50:33.304000 [0-0] == Info: [WRITE] header_collect pushed(type=1, len=3011) -> 0
14:50:33.304000 [0-0] == Info: [WRITE] cw_out, wrote 3011 header bytes -> 3011
14:50:33.304000 [0-0] == Info: [WRITE] download_write header(type=4, blen=3011) -> 0
14:50:33.304000 [0-0] == Info: [WRITE] client_write(type=4, len=3011) -> 0
14:50:33.320000 [0-0] <= Recv header, 3011 bytes (0xbc3)
0000: header2: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0040: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0080: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
00c0: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0100: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0140: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh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hhhhhhhhhhhh
0900: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0940: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0980: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
09c0: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0a00: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0a40: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0a80: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0ac0: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0b00: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0b40: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0b80: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0bc0: h
14:50:33.450000 [0-0] == Info: [WRITE] header_collect pushed(type=1, len=3011) -> 0
14:50:33.450000 [0-0] == Info: [WRITE] cw_out, wrote 3011 header bytes -> 3011
14:50:33.461000 [0-0] == Info: [WRITE] download_write header(type=4, blen=3011) -> 0
14:50:33.461000 [0-0] == Info: [WRITE] client_write(type=4, len=3011) -> 0
14:50:33.461000 [0-0] <= Recv header, 3011 bytes (0xbc3)
0000: header3: hhhhhhhhhhhhhhhhhhhhhhhhhhh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hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0b80: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
0bc0: h
14:50:33.586000 [0-0] == Info: [WRITE] header_collect pushed(type=1, len=3011) -> 0
14:50:33.586000 [0-0] == Info: [WRITE] cw_out, wrote 3011 header bytes -> 3011
14:50:33.586000 [0-0] == Info: [WRITE] download_write header(type=4, blen=3011) -> 0
14:50:33.602000 [0-0] == Info: [WRITE] client_write(type=4, len=3011) -> 0
14:50:33.602000 [0-0] <= Recv header, 2 bytes (0x2)
0000:
14:50:33.607000 [0-0] == Info: [WRITE] header_collect pushed(type=1, len=2) -> 0
14:50:33.607000 [0-0] == Info: [WRITE] cw_out, wrote 2 header bytes -> 2
14:50:33.607000 [0-0] == Info: [WRITE] download_write header(type=4, blen=2) -> 0
14:50:33.607000 [0-0] == Info: [WRITE] client_write(type=4, len=2) -> 0
14:50:33.618000 [0-0] <= Recv data, 23 bytes (0x17)
0000: d
0003: {"result":""}
0012: 0

@alzimmermsft
Copy link
Member Author

Thanks for that further investigation @weidongxu-microsoft, it was a bit unclear to me when I was reading through Netty's code on how this was handled in the end. Will update the description and dig further into whether this should be a more easily configured option on Netty and Vert.x HttpClients.

@@ -56,6 +56,25 @@ HttpClient client = new VertxHttpClientBuilder()
.build();
```

### Create an HttpClient with custom maxHeaderSize

Create a Netty HttpClient that uses a custom maxHeaderSize. Use this sample if you're seeing an error such as
Copy link
Member

Choose a reason for hiding this comment

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

should it be vertx client?


@Timeout(value = 1, unit = TimeUnit.MINUTES)
@Test
public void canSendTinyBinaryDataDebugging() throws IOException {
Copy link
Member

Choose a reason for hiding this comment

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

did you remove the test intentionally?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants