A
A
AlexWinner2011-02-18 17:06:02
Apache HTTP Server
AlexWinner, 2011-02-18 17:06:02

Apache2.2 - choosing gzip or not gzip depending on response code

Greetings!
Tell me, please, is it possible to choose whether to use gzip compression when responding to the client, depending on which code is returned? As far as I understand, apache compresses on the fly through mod deflate, and when the response code becomes known, compression is already in progress and nothing will change. Do I understand correctly?
(In general, I need to disable compression for cases where a 302 redirect is returned.)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
homm, 2011-02-18
@AlexWinner

There is a parameter in nginx - the minimum size of the response that will be compressed. Maybe Apache has one.

V
Vlad Zhivotnev, 2011-02-18
@inkvizitor68sl

location bla bla bla {
root blablabla;
if (blablabla) {
gzip off;}
}
You get the idea...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question