From e615504889a407bf2379955b96abca466d1b6ada Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Thu, 8 Nov 2012 14:35:35 +1100 Subject: [PATCH] 392492 expect headers only examined for requests>=HTTP/1.1 --- .../jetty/server/AbstractHttpConnection.java | 55 ++++++++++--------- 1 file changed, 29 insertions(+), 26 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 49fe8ca094f..b2ad0cc0557 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 @@ -801,39 +801,42 @@ public abstract class AbstractHttpConnection extends AbstractConnection break; case HttpHeaders.EXPECT_ORDINAL: - value = HttpHeaderValues.CACHE.lookup(value); - switch(HttpHeaderValues.CACHE.getOrdinal(value)) + if (_version>=HttpVersions.HTTP_1_1_ORDINAL) { - case HttpHeaderValues.CONTINUE_ORDINAL: - _expect100Continue=_generator instanceof HttpGenerator; - break; + value = HttpHeaderValues.CACHE.lookup(value); + switch(HttpHeaderValues.CACHE.getOrdinal(value)) + { + case HttpHeaderValues.CONTINUE_ORDINAL: + _expect100Continue=_generator instanceof HttpGenerator; + break; - case HttpHeaderValues.PROCESSING_ORDINAL: - _expect102Processing=_generator instanceof HttpGenerator; - break; + case HttpHeaderValues.PROCESSING_ORDINAL: + _expect102Processing=_generator instanceof HttpGenerator; + break; - default: - String[] values = value.toString().split(","); - for (int i=0;values!=null && i