From 38cccbba019e602bb752a7563d58e93801b2c1e8 Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Fri, 6 Mar 2015 09:55:16 +0000 Subject: [PATCH] core: Follow up to r1664205. Don't let invalid r->proto_num/protocol out of read_request_line() reach the output filters (when responding with 400 Bad Request). Suggested by: rpluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664576 13f79535-47bb-0310-9956-ffa450edef68 --- server/protocol.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/protocol.c b/server/protocol.c index cfa625a5199..9c05108ada6 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -674,6 +674,9 @@ static int read_request_line(request_rec *r, apr_bucket_brigade *bb) ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02418) "Invalid protocol '%s'", r->protocol); if (enforce_strict) { + r->proto_num = HTTP_VERSION(1,0); + r->protocol = apr_pstrdup(r->pool, "HTTP/1.0"); + r->connection->keepalive = AP_CONN_CLOSE; r->status = HTTP_BAD_REQUEST; return 0; } -- 2.47.3