Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-16321

REST do not return Content-Length header with Transfer-Encoding set

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 14.0.29.Final
    • REST
    • None

      Per RFC 9112, a response should not contain `Content-Length` and `Transfer-Encoding` headers [1]. We return an invalid response for a few requests, for example, when retrieving static content for the console:

      > curl 'http://localhost:11222/console/fonts/RedHatText-Regular.woff2' -v --output font.woff2
      * processing: http://localhost:11222/console/fonts/RedHatText-Regular.woff2
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
        0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying [::1]:11222...
      * connect to ::1 port 11222 failed: Connection refused
      *   Trying 127.0.0.1:11222...
      * Connected to localhost (127.0.0.1) port 11222
      > GET /console/fonts/RedHatText-Regular.woff2 HTTP/1.1
      > Host: localhost:11222
      > User-Agent: curl/8.2.1
      > Accept: */*
      > 
      < HTTP/1.1 200 OK
      < Expires: Sat, 24 Aug 2024 12:12:36 -0300
      < Last-Modified: Wed, 6 Dec 2023 13:13:30 -0300
      < Date: Wed, 24 Jul 2024 12:12:36 -0300
      < Content-Type: font/woff2
      < Cache-control: private, max-age=2678400
      < content-length: 28169
      < Transfer-Encoding: chunked
      < 
      

      This issue is fixed on 15 by ISPN-14345.

      [1] https://datatracker.ietf.org/doc/html/rfc9112#body.content-length:~:text=MUST%20NOT%20send%20a%20Content%2DLength%20header

            rh-ee-jbolina Jose Bolina
            rh-ee-jbolina Jose Bolina
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: