diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2016-12-05 22:53:09 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2016-12-05 22:53:09 -0500 |
commit | ac9822f468cc316f4d5335d6c705dd3b366538ff (patch) | |
tree | 5f7112010bdaaee8a918ae6c24ccff99eb4d673b /src/connections-glue.c | |
parent | 445bc2914a04b74b5b8e0a3a10ef89734e5f2094 (diff) | |
download | lighttpd-git-ac9822f468cc316f4d5335d6c705dd3b366538ff.tar.gz |
[core] combine duplicated connection reset code
connection_reset() now calls connection_response_reset()
instead of duplicating the code in both routines
Diffstat (limited to 'src/connections-glue.c')
-rw-r--r-- | src/connections-glue.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/connections-glue.c b/src/connections-glue.c index d61e6aea..e1118b37 100644 --- a/src/connections-glue.c +++ b/src/connections-glue.c @@ -381,6 +381,7 @@ handler_t connection_handle_read_post_state(server *srv, connection *con) { void connection_response_reset(server *srv, connection *con) { UNUSED(srv); + con->mode = DIRECT; con->http_status = 0; con->is_writable = 1; con->file_finished = 0; @@ -390,7 +391,13 @@ void connection_response_reset(server *srv, connection *con) { con->response.keep_alive = 0; con->response.content_length = -1; con->response.transfer_encoding = 0; - buffer_reset(con->physical.path); + if (con->physical.path) { /*(skip for mod_fastcgi authorizer)*/ + buffer_reset(con->physical.doc_root); + buffer_reset(con->physical.path); + buffer_reset(con->physical.basedir); + buffer_reset(con->physical.rel_path); + buffer_reset(con->physical.etag); + } array_reset(con->response.headers); chunkqueue_reset(con->write_queue); } |