diff options
author | 2013-11-27 15:28:55 -0500 | |
---|---|---|
committer | 2013-11-27 15:28:55 -0500 | |
commit | 160ebb4779e0e6990fc7c500681b626b50422db7 (patch) | |
tree | cb66e67b322fe577e3096fbb07172f30b06ab0b3 /src/c/urweb.c | |
parent | 4fccf2716d742dfff33d868f04e940075c07d93a (diff) |
Add Connection and Content-length headers to raw HTTP responses
Diffstat (limited to 'src/c/urweb.c')
-rw-r--r-- | src/c/urweb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c index 447733be..82bbf39f 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -1282,6 +1282,10 @@ void uw_memstats(uw_context ctx) { printf("Heap: %lu/%lu\n", (unsigned long)uw_buffer_used(&ctx->heap), (unsigned long)uw_buffer_avail(&ctx->heap)); } +int uw_pagelen(uw_context ctx) { + return ctx->page.front - ctx->page.start; +} + int uw_send(uw_context ctx, int sock) { int n = uw_really_send(sock, ctx->outHeaders.start, ctx->outHeaders.front - ctx->outHeaders.start); |