Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

Bugfix for last Bugfix ;-). host/port were set to originaladdress instead of the correct values for the new Url.

allod8afe60e0778
diff --git a/source/de/anomic/http/httpdProxyHandler.java b/source/de/anomic/http/httpdProxyHandler.java
index 4862d91bc..97f942172 100644
--- a/source/de/anomic/http/httpdProxyHandler.java
+++ b/source/de/anomic/http/httpdProxyHandler.java
@@ -334,14 +334,8 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt
final String path = conProp.getProperty(httpHeader.CONNECTION_PROP_PATH); // always starts with leading '/'
final String args = conProp.getProperty(httpHeader.CONNECTION_PROP_ARGS); // may be null if no args were given
final String ip = conProp.getProperty(httpHeader.CONNECTION_PROP_CLIENTIP); // the ip from the connecting peer
-
- int port, pos;
- if ((pos = host.indexOf(":")) < 0) {
- port = 80;
- } else {
- port = Integer.parseInt(host.substring(pos + 1));
- host = host.substring(0, pos);
- }
+ int pos=0;
+ int port=0;
URL url = null;
try {
@@ -366,6 +360,13 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt
httpd.sendRespondError(conProp,respond,4,501,null,errorMsg,e);
return;
}
+
+ if ((pos = host.indexOf(":")) < 0) {
+ port = 80;
+ } else {
+ port = Integer.parseInt(host.substring(pos + 1));
+ host = host.substring(0, pos);
+ }
String ext;
if ((pos = path.lastIndexOf('.')) < 0) {