[Ur] mod_fcgid and Ur/Web

Edward Z. Yang ezyang at MIT.EDU
Sun May 6 04:45:57 EDT 2012


Excerpts from Adam Chlipala's message of Sat May 05 20:21:45 -0400 2012:
> Edward Z. Yang wrote:
> > Excerpts from Adam Chlipala's message of Sat May 05 20:08:10 -0400 2012:
> >> Why not just give "script.fcgi" a nicer name like "myApp"?  You can't
> >> use .htaccess to tell Apache which files are FastCGI scripts?  Or is the
> >> issue that the paths still wind up too long?
> > Yeah, I dislike having to have that path component. :-)
> 
> You want to have one Ur/Web application binary mapped into URI space 
> without a prefix shared by exactly the page handlers managed by this 
> app?  Otherwise, I can't see how you lose any flexibility with the 
> current approach.  Keep in mind that an Ur/Web app has a few "special" 
> URI's that are at the level of the full app.  For instance, when using 
> server-to-client message passing, there is one URI used for all message 
> communication.  In such a case, it seems unavoidable to give each app 
> its own subtree of the URI space.

Yes. The point of this particular exercise is I have a domain for my
app, and I want to utilize all of the application.  There is no one
else to be a good citizen with.

> > There may be shenanigans in some hosting environments where
> > having the fcgi is mandated (I can't remember if this was the
> > case with scripts.mit.edu; I was testing a lot of variables
> > simultaneously, and the broken 404s weren't helping.)
> 
> I'd certainly appreciate a patch to send 404 signals properly. ;)

Try this patch:

diff -r 5b678adda1c9 src/cjr_print.sml
--- a/src/cjr_print.sml Wed May 02 17:17:57 2012 -0400
+++ b/src/cjr_print.sml Sun May 06 04:45:12 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,



More information about the Ur mailing list