let me know if there are any issues with this patch, thanks

On Fri, Mar 6, 2015 at 2:16 PM, Jesse Hathaway <[email protected]> wrote:
> 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.
> ---
>  src/proto_http.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/proto_http.c b/src/proto_http.c
> index f8ad754..2afb6fa 100644
> --- a/src/proto_http.c
> +++ b/src/proto_http.c
> @@ -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))
>                 goto fail;
>
> -       /* 200 only */
> -       if (txn->status != 200)
> +       /* compress 200,201,202,203 responses only */
> +       if ((txn->status != 200) &&
> +               (txn->status != 201) &&
> +               (txn->status != 202) &&
> +               (txn->status != 203))
>                 goto fail;
>
>         /* Content-Length is null */
> --
> 2.1.3
>
>
>

Reply via email to