Mercurial > urweb
diff src/c/urweb.c @ 1915:52e88e139b25
Add Connection and Content-length headers to raw HTTP responses
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Wed, 27 Nov 2013 15:28:55 -0500 |
parents | 0354df1b6849 |
children | f5d1037effc9 |
line wrap: on
line diff
--- a/src/c/urweb.c Wed Nov 27 08:59:57 2013 -0500 +++ b/src/c/urweb.c Wed Nov 27 15:28:55 2013 -0500 @@ -1282,6 +1282,10 @@ 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);