summaryrefslogtreecommitdiffstats
path: root/server/protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'server/protocol.c')
-rw-r--r--server/protocol.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/server/protocol.c b/server/protocol.c
index 276e490528..87056dcda3 100644
--- a/server/protocol.c
+++ b/server/protocol.c
@@ -716,6 +716,13 @@ 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.
@@ -732,8 +739,6 @@ 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));