redirectors fix

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1288 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
allo 2006-01-04 17:40:18 +00:00
parent 8b6d31763d
commit 4e4bd4662d

View File

@ -348,7 +348,11 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt
redirectorWriter.flush();
}
String newUrl=redirectorReader.readLine();
url=new URL(newUrl);
if(!newUrl.equals("")){
try{
url=new URL(newUrl);
}catch(MalformedURLException e){}//just keep the old one
}
conProp.setProperty(httpHeader.CONNECTION_PROP_HOST, url.getHost()+":"+url.getPort());
conProp.setProperty(httpHeader.CONNECTION_PROP_PATH, url.getPath());
requestHeader.put(httpHeader.HOST, url.getHost()+":"+url.getPort());