Mercurial > dovecot > original-hg > dovecot-2.2
changeset 16766:8442a0dc44b7
lib-http: http-url: Fixed return of proper error message in case of a failure to parse request target Host header.
Assigned the error to the parser object rather than returning it directly.
author | Stephan Bosch <stephan@rename-it.nl> |
---|---|
date | Wed, 18 Sep 2013 23:24:11 +0300 |
parents | 34d3a9a883fa |
children | 9bf25c18ad33 |
files | src/lib-http/http-url.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-http/http-url.c Wed Sep 18 23:24:02 2013 +0300 +++ b/src/lib-http/http-url.c Wed Sep 18 23:24:11 2013 +0300 @@ -370,12 +370,12 @@ uri_parser_init(parser, pool, host_header); if (uri_parse_authority(parser, &host) <= 0) { - parser->error = t_strdup_printf("Invalid Host header: %s", parser->error); + *error_r = t_strdup_printf("Invalid Host header: %s", parser->error); return -1; } if (parser->cur != parser->end || host.enc_userinfo != NULL) { - parser->error = "Invalid Host header: Contains invalid character"; + *error_r = "Invalid Host header: Contains invalid character"; return -1; }