]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
Revert "ignore leading empty lines in HTTP requests (RFC2616)"
authorwilly tarreau <willy@wtap.(none)>
Sat, 15 Apr 2006 19:10:21 +0000 (21:10 +0200)
committerwilly tarreau <willy@wtap.(none)>
Sat, 15 Apr 2006 19:10:21 +0000 (21:10 +0200)
This reverts d13a3c8d2ae5b9742c42db067705a6464f740af6 commit.

TODO
haproxy.c

diff --git a/TODO b/TODO
index 1471c4b1b1e580e3b154052a398bbcf5b3900865..ddc9166341b651dc94c0f150869f424fd3a3a8ea 100644 (file)
--- a/TODO
+++ b/TODO
@@ -149,5 +149,4 @@ Todo for 1.2
   activity on the buffer's pointers from touching the buffer page itself.
 - make buffer size configurable in global options
 * monitor number of simultaneous sessions in logs (per srv/inst/global)
-* ignore leading empty lines in HTTP requests
 
index aebf63e1e815b3f4c608a0b8ee8ec6562ab0f016..b8cc48d0e4aa9fbe2a12715652f60fd4c4e813bc 100644 (file)
--- a/haproxy.c
+++ b/haproxy.c
@@ -3308,32 +3308,6 @@ int process_cli(struct session *t) {
            
            if (ptr == req->h) { /* empty line, end of headers */
                int line, len;
-
-               /*
-                * first, let's check that it's not a leading empty line, in
-                * which case we'll ignore and remove it (according to RFC2616).
-                */
-               if (req->h == req->data) {
-                   /* to get a complete header line, we need the ending \r\n, \n\r, \r or \n too */
-                   if (ptr > req->r - 2) {
-                       /* this is a partial header, let's wait for more to come */
-                       req->lr = ptr;
-                       break;
-                   }
-
-                   /* now we know that *ptr is either \r or \n,
-                    * and that there are at least 1 char after it.
-                    */
-                   if ((ptr[0] == ptr[1]) || (ptr[1] != '\r' && ptr[1] != '\n'))
-                       req->lr = ptr + 1; /* \r\r, \n\n, \r[^\n], \n[^\r] */
-                   else
-                       req->lr = ptr + 2; /* \r\n or \n\r */
-                   /* ignore empty leading lines */
-                   buffer_replace2(req, req->h, req->lr, NULL, 0);
-                   req->h = req->lr;
-                   continue;
-               }
-
                /* we can only get here after an end of headers */
                /* we'll have something else to do here : add new headers ... */