Apache: permitindo o POST apenas quando o conteúdo é compactado com gzip

Configurando no Apache.

<Location /some/path>
SetInputFilter DEFLATE

#Set gzip var artificially to false

SetEnvIf SetaGzipComFalse "^" gziping=0

#If not gzip, invalidate the request

SetEnvIf "Content-Encoding" ^((?!gzip).)*$ gziping=1

#Defining only post as allowed method

SetEnvIf Request_Method "POST" posting=1

#If Gzip is enabled accept only POST otherwise doesn't accept gzip on GET method

SetEnvIf gziping 0 !posting

Order allow,deny

Allow from all

Deny from env=posting

</Location>