diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2019-03-13 00:46:49 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2019-03-13 00:48:26 -0400 |
commit | 5440f04e8a9476e9a8665a93db3934a566f8beec (patch) | |
tree | df548bac0c3cb48a69db398664148dd01a8609cd /src/connections.c | |
parent | 37bd124ae4cd22c9dd7f2ee36d4bf787256d2af9 (diff) | |
download | lighttpd-git-5440f04e8a9476e9a8665a93db3934a566f8beec.tar.gz |
[core] fix assertion with server.error-handler (fixes #2941)
(thx andpr)
x-ref:
"failed assertion on incoming bad request when server.error-handler option is used"
https://redmine.lighttpd.net/issues/2941
Diffstat (limited to 'src/connections.c')
-rw-r--r-- | src/connections.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/connections.c b/src/connections.c index 2e2be98f..a67c377a 100644 --- a/src/connections.c +++ b/src/connections.c @@ -1193,6 +1193,8 @@ static int connection_handle_request(server *srv, connection *con) { con->error_handler_saved_status = -con->http_status; /*(negative to flag old behavior)*/ } + if (con->request.http_version == HTTP_VERSION_UNSET) con->request.http_version = HTTP_VERSION_1_0; + buffer_copy_buffer(con->request.uri, error_handler); connection_handle_errdoc_init(con); con->http_status = 0; /*(after connection_handle_errdoc_init())*/ |