no white pages, when clicking cancel on the password-dialog

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2198 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
allo 19 years ago
parent 0e0cfa8773
commit d7a3fdb18b

@ -0,0 +1 @@
Your Username/Password is wrong.

@ -992,7 +992,8 @@ public final class httpd implements serverHandler {
detailedErrorMsg, detailedErrorMsg,
null, null,
null, null,
stackTrace stackTrace,
null
); );
} }
@ -1014,11 +1015,12 @@ public final class httpd implements serverHandler {
null, null,
detailedErrorMsgFile, detailedErrorMsgFile,
detailedErrorMsgValues, detailedErrorMsgValues,
stackTrace stackTrace,
null
); );
} }
private static final void sendRespondError( public static final void sendRespondError(
Properties conProp, Properties conProp,
OutputStream respond, OutputStream respond,
int errorcase, int errorcase,
@ -1027,7 +1029,8 @@ public final class httpd implements serverHandler {
String detailedErrorMsgText, String detailedErrorMsgText,
Object detailedErrorMsgFile, Object detailedErrorMsgFile,
serverObjects detailedErrorMsgValues, serverObjects detailedErrorMsgValues,
Exception stackTrace Exception stackTrace,
httpHeader header
) throws IOException { ) throws IOException {
FileInputStream fis = null; FileInputStream fis = null;
@ -1144,7 +1147,8 @@ public final class httpd implements serverHandler {
byte[] result = o.toByteArray(); byte[] result = o.toByteArray();
o.close(); o = null; o.close(); o = null;
httpHeader header = new httpHeader(); if(header == null)
header = new httpHeader();
header.put(httpHeader.DATE, systemDate); header.put(httpHeader.DATE, systemDate);
header.put(httpHeader.CONTENT_TYPE, "text/html"); header.put(httpHeader.CONTENT_TYPE, "text/html");
header.put(httpHeader.CONTENT_LENGTH, Integer.toString(result.length)); header.put(httpHeader.CONTENT_LENGTH, Integer.toString(result.length));

@ -322,7 +322,8 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http
// no authorization given in response. Ask for that // no authorization given in response. Ask for that
httpHeader headers = getDefaultHeaders(path); httpHeader headers = getDefaultHeaders(path);
headers.put(httpHeader.WWW_AUTHENTICATE,"Basic realm=\"admin log-in\""); headers.put(httpHeader.WWW_AUTHENTICATE,"Basic realm=\"admin log-in\"");
httpd.sendRespondHeader(conProp,out,httpVersion,401,headers); //httpd.sendRespondHeader(conProp,out,httpVersion,401,headers);
httpd.sendRespondError(conProp, out, 5, 401, "Wrong Authentication", "", new File("proxymsg/authfail.inc"), new serverObjects(), null, headers);
return; return;
} }

Loading…
Cancel
Save