Fix HTTP error codes (patch by Vance Lankhaar)
authorJelmer Vernooij <jelmer@samba.org>
Fri, 28 Feb 2003 08:48:26 +0000 (08:48 +0000)
committerJelmer Vernooij <jelmer@samba.org>
Fri, 28 Feb 2003 08:48:26 +0000 (08:48 +0000)
source/web/cgi.c

index 8abc2f0bd5c6b5ff20b6b1972d92c92eacd6a7fd..212c2884b603f4ac7eb06b8c8fbd5379b2b1d6aa 100644 (file)
@@ -455,11 +455,11 @@ void cgi_setup(const char *rootdir, int auth_required)
        char *lang;
 
        if (chdir(rootdir)) {
-               cgi_setup_error("400 Server Error", "",
+               cgi_setup_error("500 Server Error", "",
                                "chdir failed - the server is not configured correctly");
        }
 
-       /* Handle the possability we might be running as non-root */
+       /* Handle the possibility we might be running as non-root */
        sec_init();
 
        if ((lang=getenv("HTTP_ACCEPT_LANGUAGE"))) {
@@ -478,7 +478,7 @@ void cgi_setup(const char *rootdir, int auth_required)
        inetd_server = True;
 
        if (!check_access(1, lp_hostsallow(-1), lp_hostsdeny(-1))) {
-               cgi_setup_error("400 Server Error", "",
+               cgi_setup_error("403 Forbidden", "",
                                "Samba is configured to deny access from this client\n<br>Check your \"hosts allow\" and \"hosts deny\" options in smb.conf ");
        }