Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-2293

Server responds with chunked transfer even for short data from deployment

XMLWordPrintable

    • Hide

      To reproduce:

       # unzip the server and start ./bin/standalone
       # start the cli client ./bin/jboss-cli.sh -c
       # setup the server and deploy deployment

      /subsystem=undertow/server=default-server/host=default-host/setting=access-log:add()
      /subsystem=undertow/configuration=filter/gzip=gzip-filter:add()
      /subsystem=undertow/server=default-server/host=default-host/filter-ref=gzip-filter:add()
      
      deploy simple-web.war
      

       # start e.g. Wireshark to see the data traffic and perform curl request against the server:

      curl -H "Accept-Encoding: gzip" http://localhost:8080/simple-web/dummy-text.html --compressed
      
      Show
      To reproduce:  # unzip the server and start ./bin/standalone  # start the cli client ./bin/jboss-cli.sh -c  # setup the server and deploy deployment /subsystem=undertow/server= default -server/host= default -host/setting=access-log:add() /subsystem=undertow/configuration=filter/gzip=gzip-filter:add() /subsystem=undertow/server= default -server/host= default -host/filter-ref=gzip-filter:add() deploy simple-web.war  # start e.g. Wireshark to see the data traffic and perform curl request against the server: curl -H "Accept-Encoding: gzip" http: //localhost:8080/simple-web/dummy-text.html --compressed

      There is a change in server behavior after this commit. It was introduced as a fix for UNDERTOW-2243.

      Before this commit, a testing scenario for gzip filter received data with the regular "fixed-length" response from the server (Content-Length) header used (see gzip-content-length.png and gzip-content-length.pcapng). After this commit, server decides to use chunked transfer for the data without using the Content-Length header (see gzip-chunked.png and gzip-chunked.pcapng). Technically this may not be any problem, but this change means more ping-pongs between server and client.

      Attachments can be found in the cloned Jira.

            flaviarnn Flavia Rainone
            flaviarnn Flavia Rainone
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: