*) Bugfix for sendRespondError StackOverFlowException problem

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@927 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 20 years ago
parent 219acc1e8f
commit b177a80bb7

@ -981,9 +981,10 @@ public final class httpd implements serverHandler {
respond, respond,
errorcase, errorcase,
httpStatusCode, httpStatusCode,
httpStatusText, httpStatusText,
detailedErrorMsg, detailedErrorMsg,
null, null,
null,
stackTrace stackTrace
); );
} }
@ -991,7 +992,6 @@ public final class httpd implements serverHandler {
public static final void sendRespondError( public static final void sendRespondError(
Properties conProp, Properties conProp,
OutputStream respond, OutputStream respond,
int errorcase,
int httpStatusCode, int httpStatusCode,
String httpStatusText, String httpStatusText,
File detailedErrorMsgFile, File detailedErrorMsgFile,
@ -1001,9 +1001,10 @@ public final class httpd implements serverHandler {
sendRespondError( sendRespondError(
conProp, conProp,
respond, respond,
errorcase, 5,
httpStatusCode, httpStatusCode,
httpStatusText, httpStatusText,
null,
detailedErrorMsgFile, detailedErrorMsgFile,
detailedErrorMsgValues, detailedErrorMsgValues,
stackTrace stackTrace
@ -1016,7 +1017,8 @@ public final class httpd implements serverHandler {
int errorcase, int errorcase,
int httpStatusCode, int httpStatusCode,
String httpStatusText, String httpStatusText,
Object detailedErrorMsg, String detailedErrorMsgText,
Object detailedErrorMsgFile,
HashMap detailedErrorMsgValues, HashMap detailedErrorMsgValues,
Exception stackTrace Exception stackTrace
) throws IOException { ) throws IOException {
@ -1085,17 +1087,12 @@ public final class httpd implements serverHandler {
tp.put("requestMethod", conProp.getProperty(httpHeader.CONNECTION_PROP_METHOD)); tp.put("requestMethod", conProp.getProperty(httpHeader.CONNECTION_PROP_METHOD));
tp.put("requestURL", urlString); tp.put("requestURL", urlString);
if (detailedErrorMsg == null ) { switch (errorcase) {
if (errorcase == 4) case 4:
tp.put("errorMessageType_detailedErrorMsg",""); tp.put("errorMessageType_detailedErrorMsg",(detailedErrorMsgText==null)?"":detailedErrorMsgText);
else if (errorcase == 5) break;
tp.put("errorMessageType_file",""); case 5:
} else { tp.put("errorMessageType_file",(detailedErrorMsgFile==null)?"":detailedErrorMsgFile);
if (detailedErrorMsg instanceof String ) {
tp.put("errorMessageType_detailedErrorMsg",detailedErrorMsg);
} else if (detailedErrorMsg instanceof File) {
tp.put("errorMessageType_file",detailedErrorMsg);
if ((detailedErrorMsgValues != null)&&(detailedErrorMsgValues.size()>0)) { if ((detailedErrorMsgValues != null)&&(detailedErrorMsgValues.size()>0)) {
// rewriting the value-names and add the proper name prefix: // rewriting the value-names and add the proper name prefix:
Iterator nameIter = detailedErrorMsgValues.keySet().iterator(); Iterator nameIter = detailedErrorMsgValues.keySet().iterator();
@ -1103,8 +1100,10 @@ public final class httpd implements serverHandler {
String name = (String) nameIter.next(); String name = (String) nameIter.next();
tp.put("errorMessageType_" + name,detailedErrorMsgValues.get(name)); tp.put("errorMessageType_" + name,detailedErrorMsgValues.get(name));
} }
} }
} break;
default:
break;
} }
// building the stacktrace // building the stacktrace

Loading…
Cancel
Save