From: markt Date: Mon, 5 Sep 2011 17:18:50 +0000 (+0000) Subject: Headers should be read with the standard connection timeout. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d7ae7b4b11a2a5ed3a429a3a7e8990b205442001;p=tomcat7.0 Headers should be read with the standard connection timeout. The upload timeout should only be used for the request body. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1165367 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/coyote/http11/Http11AprProcessor.java b/java/org/apache/coyote/http11/Http11AprProcessor.java index 60950e46b..718a1252d 100644 --- a/java/org/apache/coyote/http11/Http11AprProcessor.java +++ b/java/org/apache/coyote/http11/Http11AprProcessor.java @@ -219,11 +219,11 @@ public class Http11AprProcessor extends AbstractHttp11Processor { if (!endpoint.isPaused()) { request.setStartTime(System.currentTimeMillis()); keptAlive = true; + inputBuffer.parseHeaders(); if (!disableUploadTimeout) { Socket.timeoutSet(socketRef, connectionUploadTimeout * 1000); } - inputBuffer.parseHeaders(); } } catch (IOException e) { if (log.isDebugEnabled()) { diff --git a/java/org/apache/coyote/http11/Http11Processor.java b/java/org/apache/coyote/http11/Http11Processor.java index a5167f9e7..34f6aaee8 100644 --- a/java/org/apache/coyote/http11/Http11Processor.java +++ b/java/org/apache/coyote/http11/Http11Processor.java @@ -212,12 +212,12 @@ public class Http11Processor extends AbstractHttp11Processor { } else { request.setStartTime(System.currentTimeMillis()); keptAlive = true; - if (disableUploadTimeout) { - socket.getSocket().setSoTimeout(soTimeout); - } else { + // Reset timeout for reading headers + socket.getSocket().setSoTimeout(soTimeout); + inputBuffer.parseHeaders(); + if (!disableUploadTimeout) { socket.getSocket().setSoTimeout(connectionUploadTimeout); } - inputBuffer.parseHeaders(); } } catch (IOException e) { if (log.isDebugEnabled()) {