Responses to `HEAD` requests should contain no body, but we send an empty body instead. That's indistinguishable for one-shot APIs, but with chunked encoding this means we send a single empty chunk as a terminator:

```
00000000  48 45 41 44 20 2f 5f 61  6c 6c 20 48 54 54 50 2f   HEAD /_a ll HTTP/
00000010  31 2e 31 0d 0a 48 6f 73  74 3a 20 6c 6f 63 61 6c   1.1..Hos t: local
00000020  68 6f 73 74 3a 39 32 30  30 0d 0a 41 63 63 65 70   host:920 0..Accep
00000030  74 2d 45 6e 63 6f 64 69  6e 67 3a 20 67 7a 69 70   t-Encodi ng: gzip
00000040  0d 0a 0d 0a                                        ....
    00000000  48 54 54 50 2f 31 2e 31  20 32 30 30 20 4f 4b 0d   HTTP/1.1  200 OK.
    00000010  0a 58 2d 65 6c 61 73 74  69 63 2d 70 72 6f 64 75   .X-elast ic-produ
    00000020  63 74 3a 20 45 6c 61 73  74 69 63 73 65 61 72 63   ct: Elas ticsearc
    00000030  68 0d 0a 63 6f 6e 74 65  6e 74 2d 74 79 70 65 3a   h..conte nt-type:
    00000040  20 61 70 70 6c 69 63 61  74 69 6f 6e 2f 6a 73 6f    applica tion/jso
    00000050  6e 0d 0a 54 72 61 6e 73  66 65 72 2d 45 6e 63 6f   n..Trans fer-Enco
    00000060  64 69 6e 67 3a 20 63 68  75 6e 6b 65 64 0d 0a 0d   ding: ch unked...
    00000070  0a 30 0d 0a 0d 0a                                  .0....
              ^^ should have stopped here!
```

This became particularly noticeable with https://github.com/elastic/elasticsearch/pull/92016 because `HEAD /<index>` is the recognised way to determine if an index exists, but really this is a general problem with the infrastructure introduced in https://github.com/elastic/elasticsearch/pull/88311.
modules/transport-netty4/src/main/java/org/elasticsearch/http/netty4/Netty4HttpServerTransport.java
*
     * By default we assume the Ethernet MTU (1500 bytes) but users can override it with a system property.
     */
    private static final ByteSizeValue MTU = ByteSizeValue.ofBytes(Long.parseLong(System.getProperty("es.net.mtu", "1500")));
    private static final String SETTING_KEY_HTTP_NETTY_MAX_COMPOSITE_BUFFER_COMPONENTS = "http.netty.max_composite_buffer_components";
    public static Setting<Integer> SETTING_HTTP_NETTY_MAX_COMPOSITE_BUFFER_COMPONENTS = new Setting<>(
        SETTING_KEY_HTTP_NETTY_MAX_COMPOSITE_BUFFER_COMPONENTS,
        (s) -> {
            ByteSizeValue maxContentLength = SETTING_HTTP_MAX_CONTENT_LENGTH.get(s);
            /*
             * Netty accumulates buffers containing data from all incoming network packets that make up one HTTP request in an instance of
             * io.netty.buffer.CompositeByteBuf (think of it as a buffer of buffers). Once its capacity is reached, the buffer will iterate
             * over its individual entries and put them into larger buffers (see io.netty.buffer.CompositeByteBuf#consolidateIfNeeded()
             * for implementation details). We want to to resize that buffer because this leads to additional garbage on the heap and also
             * increases the application's native memory footprint (as direct byte buffers hold their contents off-heap).
             *
             * With this setting we control the CompositeByteBuf's capacity (which is by default 1024, see
             * io.netty.handler.codec.MessageAggregator#DEFAULT_MAX_COMPOSITEBUFFER_COMPONENTS). To determine a proper default capacity for
             * that buffer, we need to consider that the upper bound for the size of HTTP requests is determined by `maxContentLength`. The
             * number of buffers that are needed depend on how often Netty reads network packets which depends on the network type (MTU).
             * We assume here that Elasticsearch receives HTTP requests via an Ethernet connection which has a MTU of 1500 bytes.
             *
             * Note that we are *not* pre-allocating any memory based on this setting but rather determine the CompositeByteBuf's capacity.
             * The tradeoff is between less (but larger) buffers that are contained in the CompositeByteBuf and more (but smaller) buffers.
             * With the default max content length of 100MB and a MTU of 1500 bytes we would allow 69905 entries.
             */
            long maxBufferComponentsEstimate = Math.round((double) (maxContentLength.getBytes() / MTU.getBytes()));
            
            long maxBufferComponents = Math.max(2, Math.min(maxBufferComponentsEstimate, Integer.MAX_VALUE));
            return String.valueOf(maxBufferComponents);