X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/05b75f8d50b83e943af3be4071449304d82dbdcd..6acdbba4d904b8ee764f0d564675357a46d43fa8:/cgi/cgimain.c diff --git a/cgi/cgimain.c b/cgi/cgimain.c index 253f82e..219f2b7 100644 --- a/cgi/cgimain.c +++ b/cgi/cgimain.c @@ -33,10 +33,12 @@ int main(int argc, char **argv) { /* TODO we could make disorder/ACTION equivalent to disorder?action=ACTION */ if(getenv("PATH_INFO")) { /* TODO it might be nice to link back to the right place... */ - printf("Content-Type: text/html\n"); + printf("Content-Type: text/html; charset=UTF-8\n"); printf("Status: 404\n"); printf("\n"); - printf("

Sorry, PATH_INFO not supported.

\n"); + printf("

Sorry, is PATH_INFO not supported." + "Try here instead.

\n", + cgi_sgmlquote(infer_url(0/*!include_path_info*/))); exit(0); } /* Parse CGI arguments */ @@ -53,7 +55,7 @@ int main(int argc, char **argv) { /* Figure out our URL. This can still be overridden from the config file if * necessary but it shouldn't be necessary in ordinary installations. */ if(!config->url) - config->url = infer_url(); + config->url = infer_url(1/*include_path_info*/); /* Pick up the cookie, if there is one */ dcgi_get_cookie(); /* Register expansions */