You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2021/09/07 13:05:22 UTC

svn commit: r1893028 - in /httpd/httpd/trunk: changes-entries/init_request_on_read_failure.txt server/protocol.c

Author: ylavic
Date: Tue Sep  7 13:05:22 2021
New Revision: 1893028

URL: http://svn.apache.org/viewvc?rev=1893028&view=rev
Log:
Revert r1893026, will re-commit with minimal changes to ease backport.

Removed:
    httpd/httpd/trunk/changes-entries/init_request_on_read_failure.txt
Modified:
    httpd/httpd/trunk/server/protocol.c

Modified: httpd/httpd/trunk/server/protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/protocol.c?rev=1893028&r1=1893027&r2=1893028&view=diff
==============================================================================
--- httpd/httpd/trunk/server/protocol.c (original)
+++ httpd/httpd/trunk/server/protocol.c Tue Sep  7 13:05:22 2021
@@ -716,13 +716,6 @@ static int read_request_line(request_rec
         if (rv != APR_SUCCESS) {
             r->request_time = apr_time_now();
 
-            /* Fall through with an invalid (non NULL) request */
-            r->method = "-";
-            r->method_number = M_INVALID;
-            r->uri = r->unparsed_uri = apr_pstrdup(r->pool, "-");
-            r->proto_num = HTTP_VERSION(1,0);
-            r->protocol  = "HTTP/1.0";
-
             /* ap_rgetline returns APR_ENOSPC if it fills up the
              * buffer before finding the end-of-line.  This is only going to
              * happen if it exceeds the configured limit for a request-line.
@@ -739,6 +732,8 @@ static int read_request_line(request_rec
             else if (APR_STATUS_IS_EINVAL(rv)) {
                 r->status = HTTP_BAD_REQUEST;
             }
+            r->proto_num = HTTP_VERSION(1,0);
+            r->protocol  = "HTTP/1.0";
             return 0;
         }
     } while ((len <= 0) && (--num_blank_lines >= 0));