Bugfix for last Bugfix ;-).

host/port were set to originaladdress instead of the correct values for the new Url.


git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1126 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
allo 20 years ago
parent 1b656f6b31
commit d8afe60e07

@ -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) {

Loading…
Cancel
Save