mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-12 06:24:56 +00:00
92d3638d2d
HTTP compression has been rewritten to use the filter API. This is more a PoC than other thing for now. It allocates memory to work. So, if only for that, it should be rewritten. In the mean time, the implementation has been refactored to allow its use with other filters. However, there are limitations that should be respected: - No filter placed after the compression one is allowed to change input data (in 'http_data' callback). - No filter placed before the compression one is allowed to change forwarded data (in 'http_forward_data' callback). For now, these limitations are informal, so you should be careful when you use several filters. About the configuration, 'compression' keywords are still supported and must be used to configure the HTTP compression behavior. In absence of a 'filter' line for the compression filter, it is added in the filter chain when the first compression' line is parsed. This is an easy way to do when you do not use other filters. But another filter exists, an error is reported so that the user must explicitly declare the filter. For example: listen tst ... compression algo gzip compression offload ... filter flt_1 filter compression filter flt_2 ...
30 lines
1.0 KiB
C
30 lines
1.0 KiB
C
/*
|
|
* include/proto/flt_http_comp.h
|
|
* This file defines function prototypes for the compression filter.
|
|
*
|
|
* Copyright (C) 2015 Qualys Inc., Christopher Faulet <cfaulet@qualys.com>
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation, version 2.1
|
|
* exclusively.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
#ifndef _PROTO_FLT_HTTP_COMP_H
|
|
#define _PROTO_FLT_HTTP_COMP_H
|
|
|
|
#include <types/proxy.h>
|
|
|
|
int check_legacy_http_comp_flt(struct proxy *proxy);
|
|
|
|
|
|
#endif // _PROTO_FLT_HTTP_COMP_H
|