MEDIUM: http: Compress HTTP responses with status codes 201,202,203 in addition to 200
It is common for rest applications to return status codes other than 200, so compress the other common 200 level responses which might contain content.
This commit is contained in:
parent
2ec2274f90
commit
2468d4e4f7
@ -2362,8 +2362,11 @@ int select_compression_response_header(struct session *s, struct buffer *res)
|
|||||||
if (!(msg->flags & HTTP_MSGF_VER_11) || !(txn->req.flags & HTTP_MSGF_VER_11))
|
if (!(msg->flags & HTTP_MSGF_VER_11) || !(txn->req.flags & HTTP_MSGF_VER_11))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
/* 200 only */
|
/* compress 200,201,202,203 responses only */
|
||||||
if (txn->status != 200)
|
if ((txn->status != 200) &&
|
||||||
|
(txn->status != 201) &&
|
||||||
|
(txn->status != 202) &&
|
||||||
|
(txn->status != 203))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
/* Content-Length is null */
|
/* Content-Length is null */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user