progname = argv[0];
/* RFC 3875 s8.2 recommends rejecting PATH_INFO if we don't make use of
* it. */
+ if(!setlocale(LC_CTYPE, "")) disorder_error(errno, "error calling setlocale");
/* 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... */
mx_search_path(pkgdatadir);
/* Never cache anythging */
if(printf("Cache-Control: no-cache\n") < 0)
- fatal(errno, "error writing to stdout");
+ disorder_fatal(errno, "error writing to stdout");
/* Create the initial connection, trying the cookie if we found a suitable
* one. */
dcgi_login();
/* In practice if a write fails that probably means the web server went away,
* but we log it anyway. */
if(fclose(stdout) < 0)
- fatal(errno, "error closing stdout");
+ disorder_fatal(errno, "error closing stdout");
return 0;
}