comparison src/c/urweb.c @ 464:91914c15a85b

Cookie demo code; fix error message display
author Adam Chlipala <adamc@hcoop.net>
date Thu, 06 Nov 2008 12:22:50 -0500
parents bb27c7efcd90
children 1626dcba13ee
comparison
equal deleted inserted replaced
463:bb27c7efcd90 464:91914c15a85b
313 n = uw_really_send(sock, "\r\n", 2); 313 n = uw_really_send(sock, "\r\n", 2);
314 314
315 if (n < 0) 315 if (n < 0)
316 return n; 316 return n;
317 317
318 n = uw_really_send(sock, "<html>", 6); 318 return uw_really_send(sock, ctx->page, ctx->page_front - ctx->page);
319
320 if (n < 0)
321 return n;
322
323 n = uw_really_send(sock, ctx->page, ctx->page_front - ctx->page);
324
325 if (n < 0)
326 return n;
327
328 return uw_really_send(sock, "</html>", 7);
329 } 319 }
330 320
331 static void uw_check_headers(uw_context ctx, size_t extra) { 321 static void uw_check_headers(uw_context ctx, size_t extra) {
332 size_t desired = ctx->outHeaders_front - ctx->outHeaders + extra, next; 322 size_t desired = ctx->outHeaders_front - ctx->outHeaders + extra, next;
333 char *new_outHeaders; 323 char *new_outHeaders;