include WWW-Authenticate field in 401 response for bad auth attempt; bug 629
authorGerald Carter <jerry@samba.org>
Sat, 22 Nov 2003 06:16:01 +0000 (06:16 +0000)
committerGerald Carter <jerry@samba.org>
Sat, 22 Nov 2003 06:16:01 +0000 (06:16 +0000)
(This used to be commit 879d0f15ea260d61c56c5b841065ecb2f5ec26ca)

source3/web/cgi.c

index 49a8fa92de4a937da3f44e6bfc344d54856c13c4..07e3ee38fbf68b49dafd16203cd25244adbbc441 100644 (file)
@@ -355,7 +355,8 @@ static BOOL cgi_handle_authorization(char *line)
        }
        
 err:
-       cgi_setup_error("401 Bad Authorization", "", 
+       cgi_setup_error("401 Bad Authorization", 
+                       "WWW-Authenticate: Basic realm=\"SWAT\"\r\n",
                        "username or password incorrect");
 
        passwd_free(&pass);