hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r407992 - in /jakarta/httpcomponents/httpcore/trunk/src/java/org/apache/http: UnsupportedHttpVersionException.java protocol/HttpService.java
Date Sat, 20 May 2006 12:52:39 GMT
Author: olegk
Date: Sat May 20 05:52:38 2006
New Revision: 407992

URL: http://svn.apache.org/viewvc?rev=407992&view=rev
Log:
Added unsupported HTTP version exception

Added:
    jakarta/httpcomponents/httpcore/trunk/src/java/org/apache/http/UnsupportedHttpVersionException.java
      - copied, changed from r407922, jakarta/httpcomponents/tcconnector/trunk/src/java/org/apache/http/tcconnector/UnsupportedHttpVersionException.java
Modified:
    jakarta/httpcomponents/httpcore/trunk/src/java/org/apache/http/protocol/HttpService.java

Copied: jakarta/httpcomponents/httpcore/trunk/src/java/org/apache/http/UnsupportedHttpVersionException.java
(from r407922, jakarta/httpcomponents/tcconnector/trunk/src/java/org/apache/http/tcconnector/UnsupportedHttpVersionException.java)
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/src/java/org/apache/http/UnsupportedHttpVersionException.java?p2=jakarta/httpcomponents/httpcore/trunk/src/java/org/apache/http/UnsupportedHttpVersionException.java&p1=jakarta/httpcomponents/tcconnector/trunk/src/java/org/apache/http/tcconnector/UnsupportedHttpVersionException.java&r1=407922&r2=407992&rev=407992&view=diff
==============================================================================
--- jakarta/httpcomponents/tcconnector/trunk/src/java/org/apache/http/tcconnector/UnsupportedHttpVersionException.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/src/java/org/apache/http/UnsupportedHttpVersionException.java
Sat May 20 05:52:38 2006
@@ -27,7 +27,7 @@
  *
  */
 
-package org.apache.http.tcconnector;
+package org.apache.http;
 
 import org.apache.http.ProtocolException;
 

Modified: jakarta/httpcomponents/httpcore/trunk/src/java/org/apache/http/protocol/HttpService.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/src/java/org/apache/http/protocol/HttpService.java?rev=407992&r1=407991&r2=407992&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/src/java/org/apache/http/protocol/HttpService.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/src/java/org/apache/http/protocol/HttpService.java
Sat May 20 05:52:38 2006
@@ -44,6 +44,7 @@
 import org.apache.http.MethodNotSupportedException;
 import org.apache.http.ProtocolException;
 import org.apache.http.StatusLine;
+import org.apache.http.UnsupportedHttpVersionException;
 import org.apache.http.impl.DefaultConnectionReuseStrategy;
 import org.apache.http.message.BasicHttpResponse;
 import org.apache.http.params.HttpParams;
@@ -163,6 +164,8 @@
     protected void handleException(final HttpException ex, final HttpResponse response) {
         if (ex instanceof MethodNotSupportedException) {
             response.setStatusCode(HttpStatus.SC_NOT_IMPLEMENTED);
+        } else if (ex instanceof UnsupportedHttpVersionException) {
+            response.setStatusCode(HttpStatus.SC_HTTP_VERSION_NOT_SUPPORTED);
         } else if (ex instanceof ProtocolException) {
             response.setStatusCode(HttpStatus.SC_BAD_REQUEST);
         } else {



Mime
View raw message