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

Deflate request body support (content-encoding in request) does not work as expected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.3.19.Final, 2.2.38.Final
    • 2.3.12.Final
    • Core
    • None

      When trying to use `Content-Encoding` support for request bodies, gzip works as expected but deflate does not, the request payload is unexpected.

      Reproducing project: https://github.com/flozano/undertow-compression-issue/

       

      Edit:

      It seems the issue is that the RFC specifies zlib wrapping + deflate compression, but there are implementations that just send deflate compression without zlib wrapping.

      Implementation in Undertow uses an Inflater with `nowrap=true`, and it seems to work only for payloads that are not wrapped with zlib (see reproducing project).

      There is a suggestion in stackoverflow as to use the first few bytes to decide if wrapping was used or not.

              rhn-cservice-bbaranow Bartosz Baranowski
              flozano@gmail.com Francisco Alejandro Lozano López
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: