]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
* released 1.1.19 v1.1.19
authorwilly tarreau <willy@wtap.(none)>
Sat, 17 Dec 2005 12:49:52 +0000 (13:49 +0100)
committerwilly tarreau <willy@wtap.(none)>
Sat, 17 Dec 2005 12:49:52 +0000 (13:49 +0100)
* 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.

CHANGELOG
Makefile
NOTES [deleted file]
TODO
examples/haproxy2html.sh [new file with mode: 0644]
haproxy.c

index da3392b75f0e9242860d45d1e24f58e4815600cd..bbd4d6b277d3f608fd6aa09ea8f14f68fb91299a 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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
index 959d8660fce1b5661959fc6bfb0c5d7875f79f48..361642061e38eedbeb4cd5cb09eb24ddaae1d3ef 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/NOTES b/NOTES
deleted file mode 100644 (file)
index 78de2c1..0000000
--- a/NOTES
+++ /dev/null
@@ -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.
diff --git a/TODO b/TODO
index 7d8ef742f339c534f7111567308406ba5504545b..0eb3016147ec96078096e0bca32fe9d35bef7b81 100644 (file)
--- a/TODO
+++ b/TODO
@@ -26,4 +26,4 @@
 - differentiate http headers and http uris
 - support environment variables in config file
 - support keep-alive
-
+- support SSL
diff --git a/examples/haproxy2html.sh b/examples/haproxy2html.sh
new file mode 100644 (file)
index 0000000..e3753c7
--- /dev/null
@@ -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>')
index 42e9e87a0bd94ff33c6b69c6e8dff8f39de42281..7050fefbeddd9d6b3097c95a9f940e9df6e92b5d 100644 (file)
--- a/haproxy.c
+++ b/haproxy.c
@@ -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: ' */