Mercurial > dovecot > core-2.2
changeset 19728:ea58eba051b5
lib-http: request parser: Made sure that partially parsed requests never have stale string values.
Due to the fact that we assign method and target fields early for proper
error messages, stale fields from previous requests could have ended up in a
partially parsed new request.
author | Stephan Bosch <stephan@rename-it.nl> |
---|---|
date | Mon, 08 Feb 2016 22:49:28 +0100 |
parents | 8f72e4f0ed5d |
children | 283300040a6e |
files | src/lib-http/http-request-parser.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-http/http-request-parser.c Mon Feb 08 22:47:30 2016 +0100 +++ b/src/lib-http/http-request-parser.c Mon Feb 08 22:49:28 2016 +0100 @@ -584,5 +584,9 @@ request->header = parser->parser.msg.header; request->connection_options = parser->parser.msg.connection_options; request->connection_close = parser->parser.msg.connection_close; + + /* reset this state early */ + parser->request_method = NULL; + parser->request_target = NULL; return 1; }