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
This commit is contained in:
parent
1070476469
commit
e050781fc7
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue