Mercurial > urweb
changeset 1748:95dd9f427bb2
Fix from Edward Yang to generation of 404 errors in FastCGI
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 06 May 2012 12:37:43 -0400 |
parents | 9b54fbe1efdb |
children | f9e5a8e09cdf |
files | src/cjr_print.sml src/errormsg.sml |
diffstat | 2 files changed, 10 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cjr_print.sml Sat May 05 19:57:54 2012 -0400 +++ b/src/cjr_print.sml Sun May 06 12:37:43 2012 -0400 @@ -3433,7 +3433,9 @@ newline, string "uw_clear_headers(ctx);", newline, - string "uw_write_header(ctx, \"HTTP/1.1 404 Not Found\\r\\nContent-type: text/plain\\r\\n\");", + string "uw_write_header(ctx, uw_supports_direct_status ? \"HTTP/1.1 404 Not Found\\r\\n\" : \"Status: 404 Not Found\\r\\n\");", + newline, + string "uw_write_header(ctx, \"Content-type: text/plain\\r\\n\");", newline, string "uw_write(ctx, \"Not Found\");", newline,
--- a/src/errormsg.sml Sat May 05 19:57:54 2012 -0400 +++ b/src/errormsg.sml Sun May 06 12:37:43 2012 -0400 @@ -95,13 +95,13 @@ TextIO.output1 (TextIO.stdErr, #"\n"); errors := true) -fun errorAt span s = (TextIO.output (TextIO.stdErr, #file span); - TextIO.output (TextIO.stdErr, ":"); - TextIO.output (TextIO.stdErr, posToString (#first span)); - TextIO.output (TextIO.stdErr, ": (to "); - TextIO.output (TextIO.stdErr, posToString (#last span)); - TextIO.output (TextIO.stdErr, ") "); - error s) +fun errorAt (span : span) s = (TextIO.output (TextIO.stdErr, #file span); + TextIO.output (TextIO.stdErr, ":"); + TextIO.output (TextIO.stdErr, posToString (#first span)); + TextIO.output (TextIO.stdErr, ": (to "); + TextIO.output (TextIO.stdErr, posToString (#last span)); + TextIO.output (TextIO.stdErr, ") "); + error s) fun errorAt' span s = errorAt (spanOf span) s end