September 15, 2011 11:09PM
Hi everybody,

I have the following situation:

Incoming request with method POST has binary body. I would like to extract piece(s) from the payload to use it like a caching key.

Something like:

if ( $request_body ~* (action.*) ) {
set $key $1;
}
...
proxy_cache_key $uri|$key

Unfortunately it does not work for me even if I specified (like Igor advised):

client_max_body_size 1k;

I also tried client_body_buffer_size 1k; but it did not help either.

In the error.log with debug on I can see that $request_body has value, but it never matches my condition, so $key is always empty.

Just in case I'm repeating, that request_body is binary. It has 0x00 as well as everything else. It is AMF data.

Any advices?

Thanks
--->>> qzpmwo <<<---
Subject Author Posted

How to check that $request_body has some string and use it like a caching key?

qzpmwo September 15, 2011 11:09PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 298
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready