Improve http_response() for server side errors.

In case http_response() is called with an error code indicating
a server side error (>= 500) do not append any headers set by the
caller.
This commit is contained in:
Joris Vink 2018-04-11 13:04:26 +02:00
parent 4ab028633a
commit d73a9114c0
1 changed files with 1 additions and 1 deletions

View File

@ -1664,7 +1664,7 @@ http_response_normal(struct http_request *req, struct connection *c,
http_hsts_enable);
}
if (req != NULL) {
if (req != NULL && req->status < HTTP_STATUS_INTERNAL_ERROR) {
TAILQ_FOREACH(ck, &(req->resp_cookies), list)
http_write_response_cookie(ck);