diff src/c/urweb.c @ 1726:4df4521fbd3b

Removed excess zero byte from empty pages. Zero byte sometimes breaks http tunneling in Safari. Empty page is a "Not Modified" response for app.js
author Vladimir Shabanov <vshabanoff@gmail.com>
date Wed, 25 Apr 2012 03:07:07 +0400
parents e263dab7b579
children 95d3b4f26f59
line wrap: on
line diff
--- a/src/c/urweb.c	Sun Apr 22 10:57:22 2012 -0400
+++ b/src/c/urweb.c	Wed Apr 25 03:07:07 2012 +0400
@@ -3207,8 +3207,8 @@
     if (ctx->transactionals[i].free)
       ctx->transactionals[i].free(ctx->transactionals[i].data, 0);
 
-  if (*ctx->page.front)
-    uw_writec(ctx, 0);
+  uw_check(ctx, 1);
+  *ctx->page.front = 0;
 
   // Splice script data into appropriate part of page
   if (ctx->returning_indirectly || ctx->script_header[0] == 0) {