Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1654

@Gzip annotation not working anymore

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.0.0.Beta1, 3.5.0.CR1
    • 3.0.20.Final
    • jaxrs
    • None
    • Hide

      Setup an endpoint that uses that annotation
      Call it like this:
      curl --header "Accept-Encoding: gzip" -Lv http://localhost:8777/crossdomain.xml

      • Trying 127.0.0.1...
      • Connected to localhost (127.0.0.1) port 8777 (#0)
        > GET /crossdomain.xml HTTP/1.1
        > Host: localhost:8777
        > User-Agent: curl/7.47.0
        > Accept: /
        > Accept-Encoding: gzip
        >
        < HTTP/1.1 200 OK
        < Connection: keep-alive
        < Content-Encoding: gzip
        < Content-Type: text/x-cross-domain-policy
        < transfer-encoding: chunked

      If the version is 3.0.19 you will see compressed body response. With 3.0.20 it will be in clear text.

      Show
      Setup an endpoint that uses that annotation Call it like this: curl --header "Accept-Encoding: gzip" -Lv http://localhost:8777/crossdomain.xml Trying 127.0.0.1... Connected to localhost (127.0.0.1) port 8777 (#0) > GET /crossdomain.xml HTTP/1.1 > Host: localhost:8777 > User-Agent: curl/7.47.0 > Accept: / > Accept-Encoding: gzip > < HTTP/1.1 200 OK < Connection: keep-alive < Content-Encoding: gzip < Content-Type: text/x-cross-domain-policy < transfer-encoding: chunked If the version is 3.0.19 you will see compressed body response. With 3.0.20 it will be in clear text.

    Description

      Got an endpoint as follows

      @GET
      @Produces("text/x-cross-domain-policy")
      @GZIP
      public Response getCrossdomainFile()

      { return Response.ok(CROSSDOMAIN_FILE_CONTENT).build(); }

      When building with 3.0.19.Final it compresses the response, changed to 3.0.20.Final and it no longer does it.
      Also tried to higher versions, including latest 3.1.2.Final and same thing happens.
      Some change was introduced between those 2 versions that broke it

      Attachments

        Activity

          People

            pjurak Petr Jurak (Inactive)
            iker.jimenez Iker Jimenez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: