Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2011-02-23 00:49:11 +0000
committerGreg Wilkins2011-02-23 00:49:11 +0000
commite050781fc73c3ee08eccf94846f9f9fff7577a71 (patch)
treee792a0e681af989360b425afeffa46da10753c98
parent1070476469983e228ffba44095523328b9df3c18 (diff)
downloadorg.eclipse.jetty.project-e050781fc73c3ee08eccf94846f9f9fff7577a71.tar.gz
org.eclipse.jetty.project-e050781fc73c3ee08eccf94846f9f9fff7577a71.tar.xz
org.eclipse.jetty.project-e050781fc73c3ee08eccf94846f9f9fff7577a71.zip
JETTY-1317 More elegent handling of bad URIs in requests
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2822 7e9141cc-0065-0410-87d8-b60c137991c4
-rw-r--r--VERSION.txt1
-rw-r--r--example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded/LikeJettyXml.java1
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java4
3 files changed, 6 insertions, 0 deletions
diff --git a/VERSION.txt b/VERSION.txt
index 8b3c30db1a..f5590d2f51 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -17,6 +17,7 @@ jetty-7.3.1-SNAPSHOT
+ 337878 Extra tests of security constraints
+ 337896 HttpExchange.timeout does not override HttpClient.timeout
+ 337898 set client HttpConnection max idle time from exchange timeout
+ + JETTY-1317 More elegent handling of bad URIs in requests
+ JETTY-1331 Allow alternate XML configuration processors (eg spring)
+ JETTY-1335 HttpClient's SelectConnector clean-up
diff --git a/example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded/LikeJettyXml.java b/example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded/LikeJettyXml.java
index 38b058713b..1cda046081 100644
--- a/example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded/LikeJettyXml.java
+++ b/example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded/LikeJettyXml.java
@@ -39,6 +39,7 @@ public class LikeJettyXml
{
public static void main(String[] args) throws Exception
{
+ Log.getLog().setDebugEnabled(true);
String jetty_home = System.getProperty("jetty.home","../jetty-distribution/target/distribution");
System.setProperty("jetty.home",jetty_home);
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java
index f659d0258e..bb1603d873 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java
@@ -877,6 +877,8 @@ public class HttpConnection implements Connection
else
{
version= HttpVersions.CACHE.get(version);
+ if (version==null)
+ throw new HttpException(HttpStatus.BAD_REQUEST_400,null);
_version = HttpVersions.CACHE.getOrdinal(version);
if (_version <= 0) _version = HttpVersions.HTTP_1_0_ORDINAL;
_request.setProtocol(version.toString());
@@ -885,6 +887,8 @@ public class HttpConnection implements Connection
catch (Exception e)
{
Log.debug(e);
+ if (e instanceof HttpException)
+ throw (HttpException)e;
throw new HttpException(HttpStatus.BAD_REQUEST_400,null,e);
}
}

Back to the top