commit f3e863a482d302aa8d1ecb547196eb336a5c4215
parent fa69f2a49c397c0a843157804d3b76b3fc0c93e2
Author: Joris Vink <joris@coders.se>
Date: Mon, 25 Aug 2014 10:58:34 +0200
Properly end headers when doing status codes only.
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/http.c b/src/http.c
@@ -1220,11 +1220,10 @@ http_response_normal(struct http_request *req, struct connection *c,
}
}
- if (len > 0) {
+ if (len > 0)
kore_buf_appendf(header_buf, "content-length: %d\r\n", len);
- kore_buf_append(header_buf, "\r\n", 2);
- }
+ kore_buf_append(header_buf, "\r\n", 2);
net_send_queue(c, header_buf->data, header_buf->offset,
NULL, NETBUF_LAST_CHAIN);