* released 1.1.19

* haproxy was NOT RFC compliant because it was case-sensitive on HTTP
  "Cookie:" and "Set-Cookie:" headers. This caused JVM 1.4 to fail on
  cookie persistence because it uses "cookie:". Two memcmp() have been
  replaced with strncasecmp().
* added the haproxy2html.sh script
* removed the now useless NOTES file
* made pcre-config quiet in the makefile.
This commit is contained in:
willy tarreau 2005-12-17 13:49:52 +01:00
parent 036e1cef51
commit 906b268436
6 changed files with 23 additions and 27 deletions

View File

@ -1,6 +1,12 @@
ChangeLog :
===========
2003/04/16 : 1.1.19
- haproxy was NOT RFC compliant because it was case-sensitive on HTTP
"Cookie:" and "Set-Cookie:" headers. This caused JVM 1.4 to fail on
cookie persistence because it uses "cookie:". Two memcmp() have been
replaced with strncasecmp().
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.
@ -64,7 +70,7 @@ ChangeLog :
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.
all the header. Should now be compliant to RFC2965.
- 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

View File

@ -15,7 +15,7 @@ REGEX=libc
#REGEX=pcre
# This is the directory hosting include/pcre.h and lib/libpcre.* when REGEX=pcre
PCREDIR := $(shell pcre-config --prefix)
PCREDIR := $(shell pcre-config --prefix 2>/dev/null)
#PCREDIR=/usr/local
# This is for Linux 2.4 with netfilter

19
NOTES
View File

@ -1,19 +0,0 @@
1.1.5 -> 1.1.6
* added reqdeny / reqallow rules
* added HTTP 400 and 403 responses
* chain regex in a list
* reply 502 when no server is available
1.1.6 -> 1.1.7
* implement global logging
* have a single log function
* add x-forwarded-for
* log http requests on demand, and destination server name
1.1.7 -> 1.1.8
* full HTTP log with destination server ID, req and resp time.
* source address of outgoing connections
1.1.8 -> 1.1.9
1.1.9 -> 1.1.10
* automatically remove client cookie in insert+indirect mode
1.1.10 -> 1.1.11
* support multi-cookie as described in RFC2109
* added "nocache" option to prevent caches from storing cookies.

2
TODO
View File

@ -26,4 +26,4 @@
- differentiate http headers and http uris
- support environment variables in config file
- support keep-alive
- support SSL

3
examples/haproxy2html.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
#(echo '<html><body>'; sed -e 's,\(ASPSESSIONID[^; ]*\),<font color=red>\1</font>,g' -e 's,\(^srvhdr.*\)$,<font color=blue>\1</font>,' -e 's,\(^clihdr.*\)$,<font color=green>\1</font>,' -e 's,\(^.*\)$,<tt>\1</tt>,' -e 's/$/<br>/' ; echo '</body></html>')
(echo '<html><body>'; tr -d '\015' | sed -e 's,\(: Cookie:.*$\),<font color="#e000c0">\1</font>,gi' -e 's,\(: Set-Cookie:.*$\),<font color="#e0a000">\1</font>,gi' -e 's,\(^srvhdr.*\)$,<font color="#00a000">\1</font>,i' -e 's,\(^clihdr.*\)$,<font color="#0000c0">\1</font>,i' -e 's,\(^.*\)$,<tt>\1</tt>,' -e 's/$/<br>/' ; echo '</body></html>')

View File

@ -7,7 +7,10 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Pending bugs (may be not fixed because not reproduced) :
* Please refer to RFC2068 or RFC2616 for informations about HTTP protocol, and
* RFC2965 for informations about cookies usage.
*
* Pending bugs (may be not fixed because never reproduced) :
* - solaris only : sometimes, an HTTP proxy with only a dispatch address causes
* the proxy to terminate (no core) if the client breaks the connection during
* the response. Seen on 1.1.8pre4, but never reproduced. May not be related to
@ -20,6 +23,9 @@
* TODO:
* - handle properly intermediate incomplete server headers. Done ?
* - handle hot-reconfiguration
* - fix client/server state transition when server is in connect or headers state
* and client suddenly disconnects. The server *should* switch to SHUT_WR, but
* still handle HTTP headers.
*
*/
@ -47,8 +53,8 @@
#include <linux/netfilter_ipv4.h>
#endif
#define HAPROXY_VERSION "1.1.18"
#define HAPROXY_DATE "2003/04/02"
#define HAPROXY_VERSION "1.1.19"
#define HAPROXY_DATE "2003/04/16"
/* this is for libc5 for example */
#ifndef TCP_NODELAY
@ -2444,7 +2450,7 @@ int process_cli(struct session *t) {
*/
if (!delete_header && (t->proxy->cookie_name != NULL || t->proxy->capture_name != NULL)
&& !(t->flags & SN_CLDENY) && (ptr >= req->h + 8)
&& (memcmp(req->h, "Cookie: ", 8) == 0)) {
&& (strncasecmp(req->h, "Cookie: ", 8) == 0)) {
char *p1, *p2, *p3, *p4;
char *del_colon, *del_cookie, *colon;
int app_cookies;
@ -3119,7 +3125,7 @@ int process_srv(struct session *t) {
if (!delete_header /*&& (t->proxy->options & PR_O_COOK_ANY)*/
&& (t->proxy->cookie_name != NULL || t->proxy->capture_name != NULL)
&& (ptr >= rep->h + 12)
&& (memcmp(rep->h, "Set-Cookie: ", 12) == 0)) {
&& (strncasecmp(rep->h, "Set-Cookie: ", 12) == 0)) {
char *p1, *p2, *p3, *p4;
p1 = rep->h + 12; /* first char after 'Set-Cookie: ' */