Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10123

gzip added to Accept-Encoding although not requested

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 2.17.1
    • None
    • camel-jetty
    • None
    • Unknown

    Description

      I have a standard proxy route using the camel-jetty component:

      <route>
      <from uri="jetty:http://0.0.0.0:8082/docs?matchOnUriPrefix=true"/>
      <to uri="jetty:http://127.0.0.1:8080/docs?bridgeEndpoint=true&amp;throwExceptionOnFailure=false" />
      <route>
      

      The Problem is this: If a request is send to the proxy (8082) with the HTTP header "Accept-Encoding: deflate"

      curl -s -v -H 'Accept-Encoding: deflate' 'http://localhost:8082/docs/setup.html' -o /dev/null

      the "backend server" receives a request with the header "Accept-Encoding: gzip,deflate".

      This would be OK, if the compression is "terminated" at the communication to the client. However if the "backend server" returns gzipped content (marking it with the response header "Content-Encoding: gzip"), the proxy returns that header as well, although no compression is done:

      I can see that, because I get a "Exception: Not in GZIP format" in my Java Client. Also comparing the downloaded size with my curl command (

      --write-out 'size_download=%{size_download}\n'

      ) reveals the fact, that the response is not compressed.

      (I'll post my workaround, as soon as I found it. I guess I have to use a GZipHandler..)

      Attachments

        Activity

          People

            Unassigned Unassigned
            rudibatt Rudolf Batt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: