* released 1.1.18
* Haproxy can be compiled with PCRE regex instead of libc regex, by setting REGEX=pcre on the make command line. * HTTP health-checks now use "OPTIONS *" instead of "OPTIONS /". * when explicit source address binding is required, it is now also used for health-checks. * added 'reqpass' and 'reqipass' to allow certain headers but not the request itself. * factored several strings to reduce binary size by about 2 kB. * replaced setreuid() and setregid() with more standard setuid() and setgid(). * added 4 status flags to the log line indicating who ended the connection first, the sessions state, the validity of the cookie, and action taken on the set-cookie header. * rearranged the changelog and removed it from haproxy.c * large documentation updates
This commit is contained in:
parent
8337c6b7bd
commit
036e1cef51
330
CHANGELOG
330
CHANGELOG
@ -1,145 +1,185 @@
|
||||
* ChangeLog :
|
||||
*
|
||||
* 2002/10/18 : 1.1.17
|
||||
* - add the notion of "backup" servers, which are used only when all other
|
||||
* servers are down.
|
||||
* - make Set-Cookie return "" instead of "(null)" when the server has no
|
||||
* cookie assigned (useful for backup servers).
|
||||
* - "log" now supports an optionnal level name (info, notice, err ...) above
|
||||
* which nothing is sent.
|
||||
* - replaced some strncmp() with memcmp() for better efficiency.
|
||||
* - added "capture cookie" option which logs client and/or server cookies
|
||||
* - cleaned up/down messages and dump servers states upon SIGHUP
|
||||
* - added a redirection feature for errors : "errorloc <errnum> <url>"
|
||||
* - now we won't insist on connecting to a dead server, even with a cookie,
|
||||
* unless option "persist" is specified.
|
||||
* - added HTTP/408 response for client request time-out and HTTP/50[234] for
|
||||
* server reply time-out or errors.
|
||||
* 2002/09/01 : 1.1.16
|
||||
* - implement HTTP health checks when option "httpchk" is specified.
|
||||
* 2002/08/07 : 1.1.15
|
||||
* - replaced setpgid()/setpgrp() with setsid() for better portability, because
|
||||
* setpgrp() doesn't have the same meaning under Solaris, Linux, and OpenBSD.
|
||||
* 2002/07/20 : 1.1.14
|
||||
* - added "postonly" cookie mode
|
||||
* 2002/07/15 : 1.1.13
|
||||
* - tv_diff used inverted parameters which led to negative times !
|
||||
* 2002/07/13 : 1.1.12
|
||||
* - fixed stats monitoring, and optimized some tv_* for most common cases.
|
||||
* - replaced temporary 'newhdr' with 'trash' to reduce stack size
|
||||
* - made HTTP errors more HTML-fiendly.
|
||||
* - renamed strlcpy() to strlcpy2() because of a slightly difference between
|
||||
* their behaviour (return value), to avoid confusion.
|
||||
* - restricted HTTP messages to HTTP proxies only
|
||||
* - added a 502 message when the connection has been refused by the server,
|
||||
* to prevent clients from believing this is a zero-byte HTTP 0.9 reply.
|
||||
* - changed 'Cache-control:' from 'no-cache="set-cookie"' to 'private' when
|
||||
* inserting a cookie, because some caches (apache) don't understand it.
|
||||
* - fixed processing of server headers when client is in SHUTR state
|
||||
* 2002/07/04 :
|
||||
* - automatically close fd's 0,1 and 2 when going daemon ; setpgrp() after
|
||||
* setpgid()
|
||||
* 2002/06/04 : 1.1.11
|
||||
* - fixed multi-cookie handling in client request to allow clean deletion
|
||||
* in insert+indirect mode. Now, only the server cookie is deleted and not
|
||||
* all the header. Should now be compliant to RFC2109.
|
||||
* - added a "nocache" option to "cookie" to specify that we explicitly want
|
||||
* to add a "cache-control" header when we add a cookie.
|
||||
* It is also possible to add an "Expires: <old-date>" to keep compatibility
|
||||
* with old/broken caches.
|
||||
* 2002/05/10 : 1.1.10
|
||||
* - if a cookie is used in insert+indirect mode, it's desirable that the
|
||||
* the servers don't see it. It was not possible to remove it correctly
|
||||
* with regexps, so now it's removed automatically.
|
||||
* 2002/04/19 : 1.1.9
|
||||
* - don't use snprintf()'s return value as an end of message since it may
|
||||
* be larger. This caused bus errors and segfaults in internal libc's
|
||||
* getenv() during localtime() in send_log().
|
||||
* - removed dead insecure send_syslog() function and all references to it.
|
||||
* - fixed warnings on Solaris due to buggy implementation of isXXXX().
|
||||
* 2002/04/18 : 1.1.8
|
||||
* - option "dontlognull"
|
||||
* - fixed "double space" bug in config parser
|
||||
* - fixed an uninitialized server field in case of dispatch
|
||||
* with no existing server which could cause a segfault during
|
||||
* logging.
|
||||
* - the pid logged was always the father's, which was wrong for daemons.
|
||||
* - fixed wrong level "LOG_INFO" for message "proxy started".
|
||||
* 2002/04/13 :
|
||||
* - http logging is now complete :
|
||||
* - ip:port, date, proxy, server
|
||||
* - req_time, conn_time, hdr_time, tot_time
|
||||
* - status, size, request
|
||||
* - source address
|
||||
* 2002/04/12 : 1.1.7
|
||||
* - added option forwardfor
|
||||
* - added reqirep, reqidel, reqiallow, reqideny, rspirep, rspidel
|
||||
* - added "log global" in "listen" section.
|
||||
* 2002/04/09 :
|
||||
* - added a new "global" section :
|
||||
* - logs
|
||||
* - debug, quiet, daemon modes
|
||||
* - uid, gid, chroot, nbproc, maxconn
|
||||
* 2002/04/08 : 1.1.6
|
||||
* - regex are now chained and not limited anymore.
|
||||
* - unavailable server now returns HTTP/502.
|
||||
* - increased per-line args limit to 40
|
||||
* - added reqallow/reqdeny to block some request on matches
|
||||
* - added HTTP 400/403 responses
|
||||
* 2002/04/03 : 1.1.5
|
||||
* - connection logging displayed incorrect source address.
|
||||
* - added proxy start/stop and server up/down log events.
|
||||
* - replaced log message short buffers with larger trash.
|
||||
* - enlarged buffer to 8 kB and replace buffer to 4 kB.
|
||||
* 2002/03/25 : 1.1.4
|
||||
* - made rise/fall/interval time configurable
|
||||
* 2002/03/22 : 1.1.3
|
||||
* - fixed a bug : cr_expire and cw_expire were inverted in CL_STSHUT[WR]
|
||||
* which could lead to loops.
|
||||
* 2002/03/21 : 1.1.2
|
||||
* - fixed a bug in buffer management where we could have a loop
|
||||
* between event_read() and process_{cli|srv} if R==BUFSIZE-MAXREWRITE.
|
||||
* => implemented an adjustable buffer limit.
|
||||
* - fixed a bug : expiration of tasks in wait queue timeout is used again,
|
||||
* and running tasks are skipped.
|
||||
* - added some debug lines for accept events.
|
||||
* - send warnings for servers up/down.
|
||||
* 2002/03/12 : 1.1.1
|
||||
* - fixed a bug in total failure handling
|
||||
* - fixed a bug in timestamp comparison within same second (tv_cmp_ms)
|
||||
* 2002/03/10 : 1.1.0
|
||||
* - fixed a few timeout bugs
|
||||
* - rearranged the task scheduler subsystem to improve performance,
|
||||
* add new tasks, and make it easier to later port to librt ;
|
||||
* - allow multiple accept() for one select() wake up ;
|
||||
* - implemented internal load balancing with basic health-check ;
|
||||
* - cookie insertion and header add/replace/delete, with better strings
|
||||
* support.
|
||||
* 2002/03/08
|
||||
* - reworked buffer handling to fix a few rewrite bugs, and
|
||||
* improve overall performance.
|
||||
* - implement the "purge" option to delete server cookies in direct mode.
|
||||
* 2002/03/07
|
||||
* - fixed some error cases where the maxfd was not decreased.
|
||||
* 2002/02/26
|
||||
* - now supports transparent proxying, at least on linux 2.4.
|
||||
* 2002/02/12
|
||||
* - soft stop works again (fixed select timeout computation).
|
||||
* - it seems that TCP proxies sometimes cannot timeout.
|
||||
* - added a "quiet" mode.
|
||||
* - enforce file descriptor limitation on socket() and accept().
|
||||
* 2001/12/30 : release of version 1.0.2 : fixed a bug in header processing
|
||||
* 2001/12/19 : release of version 1.0.1 : no MSG_NOSIGNAL on solaris
|
||||
* 2001/12/16 : release of version 1.0.0.
|
||||
* 2001/12/16 : added syslog capability for each accepted connection.
|
||||
* 2001/11/19 : corrected premature end of files and occasional SIGPIPE.
|
||||
* 2001/10/31 : added health-check type servers (mode health) which replies OK then closes.
|
||||
* 2001/10/30 : added the ability to support standard TCP proxies and HTTP proxies
|
||||
* with or without cookies (use keyword http for this).
|
||||
* 2001/09/01 : added client/server header replacing with regexps.
|
||||
* eg:
|
||||
* cliexp ^(Host:\ [^:]*).* Host:\ \1:80
|
||||
* srvexp ^Server:\ .* Server:\ Apache
|
||||
* 2000/11/29 : first fully working release with complete FSMs and timeouts.
|
||||
* 2000/11/28 : major rewrite
|
||||
* 2000/11/26 : first write
|
||||
ChangeLog :
|
||||
===========
|
||||
|
||||
2003/04/02 : 1.1.18
|
||||
- Haproxy can be compiled with PCRE regex instead of libc regex, by setting
|
||||
REGEX=pcre on the make command line.
|
||||
- HTTP health-checks now use "OPTIONS *" instead of "OPTIONS /".
|
||||
- when explicit source address binding is required, it is now also used for
|
||||
health-checks.
|
||||
- added 'reqpass' and 'reqipass' to allow certain headers but not the request
|
||||
itself.
|
||||
- factored several strings to reduce binary size by about 2 kB.
|
||||
- replaced setreuid() and setregid() with more standard setuid() and setgid().
|
||||
- added 4 status flags to the log line indicating who ended the connection
|
||||
first, the sessions state, the validity of the cookie, and action taken on
|
||||
the set-cookie header.
|
||||
|
||||
2002/10/18 : 1.1.17
|
||||
- add the notion of "backup" servers, which are used only when all other
|
||||
servers are down.
|
||||
- make Set-Cookie return "" instead of "(null)" when the server has no
|
||||
cookie assigned (useful for backup servers).
|
||||
- "log" now supports an optionnal level name (info, notice, err ...) above
|
||||
which nothing is sent.
|
||||
- replaced some strncmp() with memcmp() for better efficiency.
|
||||
- added "capture cookie" option which logs client and/or server cookies
|
||||
- cleaned up/down messages and dump servers states upon SIGHUP
|
||||
- added a redirection feature for errors : "errorloc <errnum> <url>"
|
||||
- now we won't insist on connecting to a dead server, even with a cookie,
|
||||
unless option "persist" is specified.
|
||||
- added HTTP/408 response for client request time-out and HTTP/50[234] for
|
||||
server reply time-out or errors.
|
||||
|
||||
2002/09/01 : 1.1.16
|
||||
- implement HTTP health checks when option "httpchk" is specified.
|
||||
|
||||
2002/08/07 : 1.1.15
|
||||
- replaced setpgid()/setpgrp() with setsid() for better portability, because
|
||||
setpgrp() doesn't have the same meaning under Solaris, Linux, and OpenBSD.
|
||||
|
||||
2002/07/20 : 1.1.14
|
||||
- added "postonly" cookie mode
|
||||
|
||||
2002/07/15 : 1.1.13
|
||||
- tv_diff used inverted parameters which led to negative times !
|
||||
|
||||
2002/07/13 : 1.1.12
|
||||
- fixed stats monitoring, and optimized some tv_* for most common cases.
|
||||
- replaced temporary 'newhdr' with 'trash' to reduce stack size
|
||||
- made HTTP errors more HTML-fiendly.
|
||||
- renamed strlcpy() to strlcpy2() because of a slightly difference between
|
||||
their behaviour (return value), to avoid confusion.
|
||||
- restricted HTTP messages to HTTP proxies only
|
||||
- added a 502 message when the connection has been refused by the server,
|
||||
to prevent clients from believing this is a zero-byte HTTP 0.9 reply.
|
||||
- changed 'Cache-control:' from 'no-cache="set-cookie"' to 'private' when
|
||||
inserting a cookie, because some caches (apache) don't understand it.
|
||||
- fixed processing of server headers when client is in SHUTR state
|
||||
|
||||
2002/07/04 :
|
||||
- automatically close fd's 0,1 and 2 when going daemon ; setpgrp() after
|
||||
setpgid()
|
||||
|
||||
2002/06/04 : 1.1.11
|
||||
- fixed multi-cookie handling in client request to allow clean deletion
|
||||
in insert+indirect mode. Now, only the server cookie is deleted and not
|
||||
all the header. Should now be compliant to RFC2109.
|
||||
- added a "nocache" option to "cookie" to specify that we explicitly want
|
||||
to add a "cache-control" header when we add a cookie.
|
||||
It is also possible to add an "Expires: <old-date>" to keep compatibility
|
||||
with old/broken caches.
|
||||
|
||||
2002/05/10 : 1.1.10
|
||||
- if a cookie is used in insert+indirect mode, it's desirable that the
|
||||
the servers don't see it. It was not possible to remove it correctly
|
||||
with regexps, so now it's removed automatically.
|
||||
|
||||
2002/04/19 : 1.1.9
|
||||
- don't use snprintf()'s return value as an end of message since it may
|
||||
be larger. This caused bus errors and segfaults in internal libc's
|
||||
getenv() during localtime() in send_log().
|
||||
- removed dead insecure send_syslog() function and all references to it.
|
||||
- fixed warnings on Solaris due to buggy implementation of isXXXX().
|
||||
|
||||
2002/04/18 : 1.1.8
|
||||
- option "dontlognull"
|
||||
- fixed "double space" bug in config parser
|
||||
- fixed an uninitialized server field in case of dispatch
|
||||
with no existing server which could cause a segfault during
|
||||
logging.
|
||||
- the pid logged was always the father's, which was wrong for daemons.
|
||||
- fixed wrong level "LOG_INFO" for message "proxy started".
|
||||
|
||||
2002/04/13 :
|
||||
- http logging is now complete :
|
||||
- ip:port, date, proxy, server
|
||||
- req_time, conn_time, hdr_time, tot_time
|
||||
- status, size, request
|
||||
- source address
|
||||
|
||||
2002/04/12 : 1.1.7
|
||||
- added option forwardfor
|
||||
- added reqirep, reqidel, reqiallow, reqideny, rspirep, rspidel
|
||||
- added "log global" in "listen" section.
|
||||
|
||||
2002/04/09 :
|
||||
- added a new "global" section :
|
||||
- logs
|
||||
- debug, quiet, daemon modes
|
||||
- uid, gid, chroot, nbproc, maxconn
|
||||
|
||||
2002/04/08 : 1.1.6
|
||||
- regex are now chained and not limited anymore.
|
||||
- unavailable server now returns HTTP/502.
|
||||
- increased per-line args limit to 40
|
||||
- added reqallow/reqdeny to block some request on matches
|
||||
- added HTTP 400/403 responses
|
||||
|
||||
2002/04/03 : 1.1.5
|
||||
- connection logging displayed incorrect source address.
|
||||
- added proxy start/stop and server up/down log events.
|
||||
- replaced log message short buffers with larger trash.
|
||||
- enlarged buffer to 8 kB and replace buffer to 4 kB.
|
||||
|
||||
2002/03/25 : 1.1.4
|
||||
- made rise/fall/interval time configurable
|
||||
|
||||
2002/03/22 : 1.1.3
|
||||
- fixed a bug : cr_expire and cw_expire were inverted in CL_STSHUT[WR]
|
||||
which could lead to loops.
|
||||
|
||||
2002/03/21 : 1.1.2
|
||||
- fixed a bug in buffer management where we could have a loop
|
||||
between event_read() and process_{cli|srv} if R==BUFSIZE-MAXREWRITE.
|
||||
=> implemented an adjustable buffer limit.
|
||||
- fixed a bug : expiration of tasks in wait queue timeout is used again,
|
||||
and running tasks are skipped.
|
||||
- added some debug lines for accept events.
|
||||
- send warnings for servers up/down.
|
||||
|
||||
2002/03/12 : 1.1.1
|
||||
- fixed a bug in total failure handling
|
||||
- fixed a bug in timestamp comparison within same second (tv_cmp_ms)
|
||||
|
||||
2002/03/10 : 1.1.0
|
||||
- fixed a few timeout bugs
|
||||
- rearranged the task scheduler subsystem to improve performance,
|
||||
add new tasks, and make it easier to later port to librt ;
|
||||
- allow multiple accept() for one select() wake up ;
|
||||
- implemented internal load balancing with basic health-check ;
|
||||
- cookie insertion and header add/replace/delete, with better strings
|
||||
support.
|
||||
|
||||
2002/03/08
|
||||
- reworked buffer handling to fix a few rewrite bugs, and
|
||||
improve overall performance.
|
||||
- implement the "purge" option to delete server cookies in direct mode.
|
||||
|
||||
2002/03/07
|
||||
- fixed some error cases where the maxfd was not decreased.
|
||||
|
||||
2002/02/26
|
||||
- now supports transparent proxying, at least on linux 2.4.
|
||||
|
||||
2002/02/12
|
||||
- soft stop works again (fixed select timeout computation).
|
||||
- it seems that TCP proxies sometimes cannot timeout.
|
||||
- added a "quiet" mode.
|
||||
- enforce file descriptor limitation on socket() and accept().
|
||||
|
||||
2001/12/30 : release of version 1.0.2 : fixed a bug in header processing
|
||||
2001/12/19 : release of version 1.0.1 : no MSG_NOSIGNAL on solaris
|
||||
2001/12/16 : release of version 1.0.0.
|
||||
2001/12/16 : added syslog capability for each accepted connection.
|
||||
2001/11/19 : corrected premature end of files and occasional SIGPIPE.
|
||||
2001/10/31 : added health-check type servers (mode health) which replies OK then closes.
|
||||
2001/10/30 : added the ability to support standard TCP proxies and HTTP proxies
|
||||
with or without cookies (use keyword http for this).
|
||||
2001/09/01 : added client/server header replacing with regexps.
|
||||
eg:
|
||||
cliexp ^(Host:\ [^:]*).* Host:\ \1:80
|
||||
srvexp ^Server:\ .* Server:\ Apache
|
||||
2000/11/29 : first fully working release with complete FSMs and timeouts.
|
||||
2000/11/28 : major rewrite
|
||||
2000/11/26 : first write
|
||||
|
18
Makefile
18
Makefile
@ -10,6 +10,14 @@ TARGET = linux24
|
||||
CC = gcc
|
||||
LD = gcc
|
||||
|
||||
# By default, we use libc's regex.
|
||||
REGEX=libc
|
||||
#REGEX=pcre
|
||||
|
||||
# This is the directory hosting include/pcre.h and lib/libpcre.* when REGEX=pcre
|
||||
PCREDIR := $(shell pcre-config --prefix)
|
||||
#PCREDIR=/usr/local
|
||||
|
||||
# This is for Linux 2.4 with netfilter
|
||||
COPTS.linux24 = -O2 -DNETFILTER
|
||||
LIBS.linux24 =
|
||||
@ -30,11 +38,17 @@ LIBS.solarisv9 = -lnsl -lsocket
|
||||
COPTS.openbsd = -O2
|
||||
LIBS.openbsd =
|
||||
|
||||
COPTS.libc=
|
||||
LIBS.libs=
|
||||
|
||||
COPTS.pcre=-DUSE_PCRE -I$(PCREDIR)/include
|
||||
LIBS.pcre=-L$(PCREDIR)/lib -lpcreposix -lpcre
|
||||
|
||||
#DEBUG =
|
||||
DEBUG = -g
|
||||
|
||||
COPTS=$(COPTS.$(TARGET))
|
||||
LIBS=$(LIBS.$(TARGET))
|
||||
COPTS=$(COPTS.$(TARGET)) $(COPTS.$(REGEX))
|
||||
LIBS=$(LIBS.$(TARGET)) $(LIBS.$(REGEX))
|
||||
|
||||
# - use -DSTATTIME=0 to disable statistics, else specify an interval in
|
||||
# milliseconds.
|
||||
|
121
doc/haproxy.txt
121
doc/haproxy.txt
@ -1,9 +1,9 @@
|
||||
|
||||
H A - P r o x y
|
||||
---------------
|
||||
version 1.1.17
|
||||
version 1.1.18
|
||||
willy tarreau
|
||||
2002/10/25
|
||||
2003/04/06
|
||||
|
||||
================
|
||||
| Introduction |
|
||||
@ -119,6 +119,8 @@ Les cat
|
||||
uucp, cron, auth2, ftp, ntp, audit, alert, cron2,
|
||||
local0, local1, local2, local3, local4, local5, local6, local7
|
||||
|
||||
Conformément à la RFC3164, les messages émis sont limités à 1024 caractères.
|
||||
|
||||
Exemple :
|
||||
---------
|
||||
global
|
||||
@ -437,7 +439,9 @@ sp
|
||||
plus généralement pour permettre aux serveurs de trouver le chemin de
|
||||
retour dans des contextes de routage difficiles. Si l'adresse est 0.0.0.0,
|
||||
elle sera choisie librement par le systeme. Si le port est 0, il
|
||||
sera choisi librement par le système.
|
||||
sera choisi librement par le système. Il est à noter que depuis la version
|
||||
1.1.18, les tests de bon foncitonnement des serveurs seront aussi effectués à
|
||||
partir de la source spécifiée par ce paramètre.
|
||||
|
||||
Exemples :
|
||||
----------
|
||||
@ -583,12 +587,15 @@ param
|
||||
Le mode par défaut consiste à établir des connexions TCP uniquement. Dans
|
||||
certains cas de pannes, des serveurs peuvent continuer à accepter les connexions
|
||||
sans les traiter. Depuis la version 1.1.16, haproxy est en mesure d'envoyer des
|
||||
requêtes HTTP courtes et très peu coûteuses : "OPTIONS / HTTP/1.0". Elles
|
||||
présentent l'avantage d'être facilement extractibles des logs, et de ne pas
|
||||
induire d'accès aux fichiers côté serveur. Seules les réponses 2xx et 3xx sont
|
||||
considérées valides, les autres (y compris non-réponses) aboutissent à un échec.
|
||||
Le temps maximal imparti pour une réponse est égal à l'intervalle entre deux
|
||||
tests (paramètre "inter"). Pour activer ce mode, spécifier l'option "httpchk".
|
||||
requêtes HTTP courtes et très peu coûteuses. Les versions 1.1.16 et 1.1.17
|
||||
utilisent "OPTIONS / HTTP/1.0". Depuis la version 1.1.18, les requêtes ont été
|
||||
changées en "OPTIONS * HTTP/1.0" pour des raisons de contrôle d'accès aux
|
||||
ressources. Elles présentent l'avantage d'être facilement extractibles des logs,
|
||||
et de ne pas induire d'accès aux fichiers côté serveur. Seules les réponses 2xx
|
||||
et 3xx sont considérées valides, les autres (y compris non-réponses) aboutissent
|
||||
à un échec. Le temps maximal imparti pour une réponse est égal à l'intervalle
|
||||
entre deux tests (paramètre "inter"). Pour activer ce mode, spécifier l'option
|
||||
"httpchk".
|
||||
|
||||
Depuis la version 1.1.17, il est possible de définir des serveurs de secours,
|
||||
utilisés uniquement lorsqu'aucun des autres serveurs ne fonctionne. Pour cela,
|
||||
@ -747,6 +754,65 @@ connexions et d
|
||||
l'option 'dontlognull', pour ne plus obtenir une ligne de log pour les sessions
|
||||
n'ayant pas donné lieu à un échange de données (requête ou réponse).
|
||||
|
||||
Exemple :
|
||||
---------
|
||||
listen http_proxy 0.0.0.0:80
|
||||
mode http
|
||||
option httplog
|
||||
option dontlognull
|
||||
log 192.168.2.200 local3
|
||||
|
||||
Depuis la version 1.1.18, un indicateur de complétude de la session a été ajouté
|
||||
dans les logs HTTP. C'est un champ de 4 caractères précédant la requête HTTP,
|
||||
indiquant :
|
||||
- sur le premier caractère, un code précisant le premier événement qui a causé
|
||||
la terminaison de la session :
|
||||
|
||||
C : fermeture de la session TCP de la part du client
|
||||
S : fermeture de la session TCP de la part du serveur, ou refus de connexion
|
||||
P : terminaison prématurée des sessions par le proxy, pour cas d'erreur
|
||||
interne ou de configuration (ex: filtre d'URL)
|
||||
c : expiration du délai d'attente côté client : clitimeout
|
||||
s : expiration du délai d'attente côté serveur: srvtimeout et contimeout
|
||||
- : terminaison normale.
|
||||
|
||||
- sur le second caractère, l'état d'avancement de la session HTTP lors de la
|
||||
fermeture :
|
||||
|
||||
R : terminaison en attendant la réception totale de la requête du client
|
||||
C : terminaison en attendant la connexion vers le serveur
|
||||
H : terminaison en attendant la réception totale des entêtes du serveur
|
||||
D : terminaison durant le transfert des données du serveur vers le client
|
||||
L : terminaison durant le transfert des dernières données du proxy vers
|
||||
le client, alors que le serveur a déjà fini.
|
||||
- : terminaison normale, après fin de transfert des données
|
||||
|
||||
- le troisième caractère indique l'éventuelle identification d'un cookie de
|
||||
persistence :
|
||||
|
||||
N : aucun cookie de persistence n'a été présenté.
|
||||
I : le client a présenté un cookie ne correspondant à aucun serveur
|
||||
connu.
|
||||
D : le client a présenté un cookie correspondant à un serveur hors
|
||||
d'usage. Suivant l'option 'persist', il a été renvoyé vers un
|
||||
autre serveur ou a tout de même tenté de se connecter sur celui
|
||||
correspondant au cookie.
|
||||
V : le client a présenté un cookie valide et a pu se connecter au
|
||||
serveur correspondant.
|
||||
- : non appliquable
|
||||
|
||||
- le dernier caractère indique l'éventuel traitement effectué sur un cookie de
|
||||
persistence retrourné par le serveur :
|
||||
|
||||
N : aucun cookie de persistence n'a été fourni par le serveur.
|
||||
P : un cookie cookie de persistence n'a été fourni par le serveur.
|
||||
I : aucun cookie n'a été fourni par le serveur, il a été inséré par le
|
||||
proxy.
|
||||
D : le cookie présenté par le serveur a été supprimé par le proxy pour
|
||||
ne pas être retourné au client.
|
||||
R : le cookie retourné par le serveur a été modifié par le proxy.
|
||||
- : non appliquable
|
||||
|
||||
Le mot clé "capture" permet d'ajouter dans des logs HTTP des informations
|
||||
capturées dans les échanges. La version 1.1.17 supporte uniquement une capture
|
||||
de cookies client et serveur, ce qui permet dans bien des cas, de reconstituer
|
||||
@ -768,10 +834,10 @@ Exemples :
|
||||
# capture du premier cookie dont le nom est exactement "vgnvisitor"
|
||||
capture cookie vgnvisitor= len 32
|
||||
|
||||
Dans les logs, le champ précédant la requête HTTP est le cookie positionné par
|
||||
le serveur, précédé du cookie positionné par le client. Chacun de ces champs est
|
||||
remplacé par le signe "-" lorsqu'aucun cookie n'est fourni par le client ou le
|
||||
serveur.
|
||||
Dans les logs, le champ précédant l'indicateur de complétude contient le cookie
|
||||
positionné par le serveur, précédé du cookie positionné par le client. Chacun de
|
||||
ces champs est remplacé par le signe "-" lorsqu'aucun cookie n'est fourni par le
|
||||
client ou le serveur.
|
||||
|
||||
Enfin, l'option 'forwardfor' ajoute l'adresse IP du client dans un champ
|
||||
'X-Forwarded-For' de la requête, ce qui permet à un serveur web final de
|
||||
@ -804,30 +870,33 @@ La syntaxe est :
|
||||
reqirep <search> <replace> idem sans distinction majuscules/minuscules
|
||||
reqdel <search> pour supprimer un en-tête dans la requête
|
||||
reqidel <search> idem sans distinction majuscules/minuscules
|
||||
reqallow <search> autoriser une requête qui valide <search>
|
||||
reqallow <search> autoriser la requête si un entête valide <search>
|
||||
reqiallow <search> idem sans distinction majuscules/minuscules
|
||||
reqdeny <search> interdire une requête qui valide <search>
|
||||
reqdeny <search> interdire la requête si un entête valide <search>
|
||||
reqideny <search> idem sans distinction majuscules/minuscules
|
||||
reqpass <search> inhibe ces actions sur les entêtes validant <search>
|
||||
reqipass <search> idem sans distinction majuscules/minuscules
|
||||
|
||||
rspadd <string> pour ajouter un en-tête dans la réponse
|
||||
rsprep <search> <replace> pour modifier la réponse
|
||||
rspirep <search> <replace> idem sans distinction majuscules/minuscules
|
||||
rspdel <search> pour supprimer un en-tête dans la réponse
|
||||
rspidel <search> idem sans distinction majuscules/minuscules
|
||||
rspadd <string> pour ajouter un en-tête dans la réponse
|
||||
rsprep <search> <replace> pour modifier la réponse
|
||||
rspirep <search> <replace> idem sans distinction majuscules/minuscules
|
||||
rspdel <search> pour supprimer un en-tête dans la réponse
|
||||
rspidel <search> idem sans distinction majuscules/minuscules
|
||||
|
||||
|
||||
<search> est une expression régulière compatible GNU regexp supportant
|
||||
le groupage par parenthèses (sans les '\'). Les espaces et autres
|
||||
séparateurs doivent êtres précédés d'un '\' pour ne pas être confondus
|
||||
avec la fin de la chaîne. De plus, certains caractères spéciaux peuvent
|
||||
être précédés d'un backslach ('\') :
|
||||
<search> est une expression régulière compatible POSIX regexp supportant le
|
||||
groupage par parenthèses (sans les '\'). Les espaces et autres séparateurs
|
||||
doivent êtres précédés d'un '\' pour ne pas être confondus avec la fin de la
|
||||
chaîne. De plus, certains caractères spéciaux peuvent être précédés d'un
|
||||
backslach ('\') :
|
||||
|
||||
\t pour une tabulation
|
||||
\r pour un retour charriot
|
||||
\n pour un saut de ligne
|
||||
\ pour différencier un espace d'un séparateur
|
||||
\# pour différencier un dièse d'un commentaire
|
||||
\\ pour un backslash
|
||||
\\ pour utiliser un backslash dans la regex
|
||||
\\\\ pour utiliser un backslash dans le texte
|
||||
\xXX pour un caractère spécifique XX (comme en C)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user