# HG changeset patch # User Adam Chlipala # Date 1336322263 14400 # Node ID 95dd9f427bb2ea03089c7ca1653065564d2d6bbb # Parent 9b54fbe1efdb7b7cd7203be3c84cb49fb38d637f Fix from Edward Yang to generation of 404 errors in FastCGI diff -r 9b54fbe1efdb -r 95dd9f427bb2 src/cjr_print.sml --- 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, diff -r 9b54fbe1efdb -r 95dd9f427bb2 src/errormsg.sml --- 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