fix: use timeout = proxy.ClientTimeout in ProxyHandler

(was 10sec fix) see http://bugs.yacy.net/view.php?id=236
pull/1/head
reger 11 years ago
parent 2c8c51ce4b
commit 4d896383db

@ -61,7 +61,15 @@ import org.eclipse.jetty.util.IO;
* proxies request, caches responses and adds urls to crawler
*/
public class ProxyHandler extends AbstractRemoteHandler implements Handler {
protected int timeout = 10000;
@Override
protected void doStart() {
super.doStart();
timeout = sb.getConfigInt("proxy.clientTimeout", 10000);
}
public static RequestHeader convertHeaderFromJetty(HttpServletRequest request) {
RequestHeader result = new RequestHeader();
Enumeration<String> headerNames = request.getHeaderNames();
@ -100,7 +108,6 @@ public class ProxyHandler extends AbstractRemoteHandler implements Handler {
setProxyHeaderForClient(request, proxyHeaders);
final HTTPClient client = new HTTPClient(ClientIdentification.yacyProxyAgent);
int timeout = 10000;
client.setTimout(timeout);
client.setHeader(proxyHeaders.entrySet());
client.setRedirecting(false);

Loading…
Cancel
Save