Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
1725:7b9775d4a8ce | 1726:4df4521fbd3b |
---|---|
3205 | 3205 |
3206 for (i = ctx->used_transactionals-1; i >= 0; --i) | 3206 for (i = ctx->used_transactionals-1; i >= 0; --i) |
3207 if (ctx->transactionals[i].free) | 3207 if (ctx->transactionals[i].free) |
3208 ctx->transactionals[i].free(ctx->transactionals[i].data, 0); | 3208 ctx->transactionals[i].free(ctx->transactionals[i].data, 0); |
3209 | 3209 |
3210 if (*ctx->page.front) | 3210 uw_check(ctx, 1); |
3211 uw_writec(ctx, 0); | 3211 *ctx->page.front = 0; |
3212 | 3212 |
3213 // Splice script data into appropriate part of page | 3213 // Splice script data into appropriate part of page |
3214 if (ctx->returning_indirectly || ctx->script_header[0] == 0) { | 3214 if (ctx->returning_indirectly || ctx->script_header[0] == 0) { |
3215 char *start = strstr(ctx->page.start, "<sc>"); | 3215 char *start = strstr(ctx->page.start, "<sc>"); |
3216 if (start) { | 3216 if (start) { |