summaryrefslogtreecommitdiffstats
path: root/server/protocol.c
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2021-09-07 15:05:22 +0200
committerYann Ylavic <ylavic@apache.org>2021-09-07 15:05:22 +0200
commite8dce10f62eacdca2daf3750223c17a91e3a3467 (patch)
treec4d45e810f1dd6d471a82dfbfed9d36b70670c11 /server/protocol.c
parentcore: Initialize the request fields on read failure to avoid NULLs. (diff)
downloadapache2-e8dce10f62eacdca2daf3750223c17a91e3a3467.tar.xz
apache2-e8dce10f62eacdca2daf3750223c17a91e3a3467.zip
Revert r1893026, will re-commit with minimal changes to ease backport.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893028 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/protocol.c')
-rw-r--r--server/protocol.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/server/protocol.c b/server/protocol.c
index 87056dcda3..276e490528 100644
--- a/server/protocol.c
+++ b/server/protocol.c
@@ -716,13 +716,6 @@ static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
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 *r, apr_bucket_brigade *bb)
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));