Forum Discussion

Shuki_griba_304's avatar
Shuki_griba_304
Icon for Nimbostratus rankNimbostratus
Feb 20, 2017

Gzip - Http request

Hello 
I have a client app that send JSON requests to the server pool.

The requests are compressed with GZIP and I'm sending a Content-Encoding: gzip header.

The ASM is not uncompressing the GZIP in the request.I know it can compress/uncompress responses, but I haven't seen anywhere where I can configure it to uncompress requests

Without this functionality, I will have to drop gzip compression, which will greatly impact my app's performance. It seems to defy logic that there isn't such a functionality.
    • Shuki_griba_304's avatar
      Shuki_griba_304
      Icon for Nimbostratus rankNimbostratus

      Thanks Vijith and Jie for your reply.

       

      The problem is that i accept all(include the first one) the requests from the client with gzip body.

       

      The ASM/F5 didn't decompress the requsts and block them with false positive violations.

       

      All the articles spoke about Http response compression.

       

      I tried to add in the Irule HTTP::compress request, but the results are same, Decompress :(

       

      Any advice ?

       

      Thanks

       

  • JG's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    As a workaround, you can set up a second virtual server with no compression support configured, and pass the traffic of your first virtual server to it. The 2nd virtual server will then be able to pick up any security vulnerabilities through the ASM. The performance will not drop that much than having no compression for your client traffic altogether.

     

  • I posted this over in: https://devcentral.f5.com/questions/uncompress-gzip-request-with-json

    There is an iRule DECOMPRESS::enable request that will accomplish this goal. I opened a support case and the engineer gave me a solution. I tested it with an LTM policy or here is the iRule:

    when HTTP_REQUEST {
      log local0. "**HTTP Request Received**"
      if { [HTTP::header "Content-Encoding"] contains "gzip"} {
        DECOMPRESS::enable request
        log local0. "Content-Encoding is GZIP, DECOMPRESS"
      }
    }
    

    I verified that content is uncompressed.