Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Clear all filters
Answers

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.
0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Actually you can enable the compression functionality for request in an irule. See: https://devcentral.f5.com/wiki/iRules.COMPRESS__enable.ashx.

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Comments on this Answer
Comment made 21-Feb-2017 by Shuki.griba 2

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

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

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.

0
Comments on this Answer
Comment made 21-Feb-2017 by Shuki.griba 2

The first request is with gzip compress. As my understanding if i will pass the traffic to 2th virtual server, the result will be the same. Am i right ?

0
Comment made 22-Feb-2017 by Jie 2732

You are right. And it turns out that this issue appeared here many times in the past, and there is still no solution to it. The irule lib contains only a small portion of the tcl lib, so it does not help resolve this issue there. The new iruleLX does contain the node.js zlib lib, and that is worth investigating.

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

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.

0