diff options
author | 2010-01-05 15:53:35 -0500 | |
---|---|---|
committer | 2010-01-05 15:53:35 -0500 | |
commit | 3232b1f7a6f470ec4eba648093cc854555d6fbdd (patch) | |
tree | b67a5a5e5e99fc172550dd57daf21aac3ddd5f10 /src/c/http.c | |
parent | 4e8b9e17f5fa9919b5a09bbf8a0a61828a54b7d4 (diff) |
Basis.textBlob; support HTTP requests with no headers
Diffstat (limited to 'src/c/http.c')
-rw-r--r-- | src/c/http.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/c/http.c b/src/c/http.c index 70001961..b070ef0f 100644 --- a/src/c/http.c +++ b/src/c/http.c @@ -147,12 +147,17 @@ static void *worker(void *data) { } } + body[-4] = '\r'; + body[-3] = '\n'; + if (!(s = strstr(buf, "\r\n"))) { fprintf(stderr, "No newline in request\n"); close(sock); goto done; } + body[-4] = body[-3] = 0; + *s = 0; headers = s + 2; method = s = buf; |