summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2009-12-02 17:09:25 +0000
committerstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2009-12-02 17:09:25 +0000
commitaed0b0c31c92c2753aca24547a262c5d0fdc6fbf (patch)
treeee5686d1d630fa480bfa8355d463aa43266b2a3c
parent45b8f4426d78268b2bff51ad86c2a10398dde4d4 (diff)
downloadlighttpd-aed0b0c31c92c2753aca24547a262c5d0fdc6fbf.tar.gz
Accept ":" in the reason-phrase of a status-line
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@2698 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r--src/http_resp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/http_resp.c b/src/http_resp.c
index 81746703..23b2e58c 100644
--- a/src/http_resp.c
+++ b/src/http_resp.c
@@ -144,8 +144,8 @@ static http_resp_parser_t http_resp_tokenizer(
default:
while (c >= 32 && c != 127 && c != 255) {
if (t->is_statusline) {
- if (c == ':') { t->is_statusline = 0; break; } /* this is not a status line by a real header */
- if (c == 32) break; /* the space is a splitter in the statusline */
+ if (t->is_key && c == ':') { t->is_statusline = 0; break; } /* this is not a status line by a real header */
+ if (c == 32) { t->is_key = 0; break; } /* the space is a splitter in the statusline */
} else {
if (t->is_key) {
if (c == ':') break; /* the : is the splitter between key and value */
@@ -212,7 +212,7 @@ parse_status_t http_response_parse_cq(chunkqueue *cq, http_resp *resp) {
t.cq = cq;
t.c = cq->first;
t.offset = t.c->offset;
- t.is_key = 0;
+ t.is_key = 1;
t.is_statusline = 1;
context.ok = 1;