aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jetty-server/src/main/java/org/eclipse/jetty/server/AbstractHttpConnection.java')
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/AbstractHttpConnection.java35
1 files changed, 33 insertions, 2 deletions
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractHttpConnection.java b/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractHttpConnection.java
index 8bf464a78d..3d2d13f94e 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractHttpConnection.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/AbstractHttpConnection.java
@@ -129,6 +129,7 @@ public abstract class AbstractHttpConnection extends AbstractConnection
private boolean _head = false;
private boolean _host = false;
private boolean _delayedHandling=false;
+ private boolean _earlyEOF = false;
/* ------------------------------------------------------------ */
public static AbstractHttpConnection getCurrentConnection()
@@ -395,6 +396,12 @@ public abstract class AbstractHttpConnection extends AbstractConnection
}
/* ------------------------------------------------------------ */
+ public boolean isEarlyEOF()
+ {
+ return _earlyEOF;
+ }
+
+ /* ------------------------------------------------------------ */
public void reset()
{
_parser.reset();
@@ -407,6 +414,7 @@ public abstract class AbstractHttpConnection extends AbstractConnection
_response.recycle();
_uri.clear();
_writer=null;
+ _earlyEOF = false;
}
/* ------------------------------------------------------------ */
@@ -443,7 +451,7 @@ public abstract class AbstractHttpConnection extends AbstractConnection
{
_uri.getPort();
String path = null;
-
+
try
{
path = _uri.getDecodedPath();
@@ -454,7 +462,7 @@ public abstract class AbstractHttpConnection extends AbstractConnection
LOG.ignore(e);
path = _uri.getDecodedPath(StringUtil.__ISO_8859_1);
}
-
+
info=URIUtil.canonicalPath(path);
if (info==null && !_request.getMethod().equals(HttpMethods.CONNECT))
{
@@ -719,6 +727,7 @@ public abstract class AbstractHttpConnection extends AbstractConnection
_requests);
}
+ /* ------------------------------------------------------------ */
protected void startRequest(Buffer method, Buffer uri, Buffer version) throws IOException
{
uri=uri.asImmutableBuffer();
@@ -778,6 +787,7 @@ public abstract class AbstractHttpConnection extends AbstractConnection
}
}
+ /* ------------------------------------------------------------ */
protected void parsedHeader(Buffer name, Buffer value) throws IOException
{
int ho = HttpHeaders.CACHE.getOrdinal(name);
@@ -839,6 +849,7 @@ public abstract class AbstractHttpConnection extends AbstractConnection
_requestFields.add(name, value);
}
+ /* ------------------------------------------------------------ */
protected void headerComplete() throws IOException
{
_requests++;
@@ -909,6 +920,7 @@ public abstract class AbstractHttpConnection extends AbstractConnection
_delayedHandling=true;
}
+ /* ------------------------------------------------------------ */
protected void content(Buffer buffer) throws IOException
{
if (_delayedHandling)
@@ -918,6 +930,7 @@ public abstract class AbstractHttpConnection extends AbstractConnection
}
}
+ /* ------------------------------------------------------------ */
public void messageComplete(long contentLength) throws IOException
{
if (_delayedHandling)
@@ -928,6 +941,12 @@ public abstract class AbstractHttpConnection extends AbstractConnection
}
/* ------------------------------------------------------------ */
+ public void earlyEOF()
+ {
+ _earlyEOF = true;
+ }
+
+ /* ------------------------------------------------------------ */
/* ------------------------------------------------------------ */
/* ------------------------------------------------------------ */
private class RequestHandler extends HttpParser.EventHandler
@@ -996,6 +1015,18 @@ public abstract class AbstractHttpConnection extends AbstractConnection
if (LOG.isDebugEnabled())
LOG.debug("Bad request!: "+version+" "+status+" "+reason);
}
+
+ /* ------------------------------------------------------------ */
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jetty.server.server.HttpParser.EventHandler#earlyEOF()
+ */
+ @Override
+ public void earlyEOF()
+ {
+ AbstractHttpConnection.this.earlyEOF();
+ }
}
/* ------------------------------------------------------------ */