]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Avoid setting r->the_request to NULL if the client sends too many blank lines.
authorBrian Pane <brianp@apache.org>
Sun, 8 Jan 2006 06:41:34 +0000 (06:41 +0000)
committerBrian Pane <brianp@apache.org>
Sun, 8 Jan 2006 06:41:34 +0000 (06:41 +0000)
Also, remove a bit of debug code.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/async-read-dev@366996 13f79535-47bb-0310-9956-ffa450edef68

server/protocol.c

index 3e723871c094e3a5115bc926dac04977885a791c..29439d9fa992476e327db99a03176c51f5159cdc 100644 (file)
@@ -587,7 +587,6 @@ static apr_status_t getline_nonblocking(char **s, apr_size_t n,
     }
     *last_char = '\0';
     bytes_handled = last_char - *s;
-    fprintf(stderr, "read line '%s'\n", *s);
 
     *read = bytes_handled;
     return APR_SUCCESS;
@@ -791,8 +790,13 @@ static apr_status_t process_request_line(request_rec *r, char *line,
             if (r->num_blank_lines < max_blank_lines) {
                 return APR_SUCCESS;
             }
+            else {
+                set_the_request(r, "");
+            }
+        }
+        else {
+            set_the_request(r, line);
         }
-        set_the_request(r, line);
     }
     else {
         /* We've already read the first line of the request.  This is either