hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r232892 - /jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/HttpConnectionProcessor.java
Date Mon, 15 Aug 2005 21:49:54 GMT
Author: olegk
Date: Mon Aug 15 14:49:50 2005
New Revision: 232892

URL: http://svn.apache.org/viewcvs?rev=232892&view=rev
Log:
Fixed bug in HTTP exception handling code

Modified:
    jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/HttpConnectionProcessor.java

Modified: jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/HttpConnectionProcessor.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/HttpConnectionProcessor.java?rev=232892&r1=232891&r2=232892&view=diff
==============================================================================
--- jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/HttpConnectionProcessor.java
(original)
+++ jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/HttpConnectionProcessor.java
Mon Aug 15 14:49:50 2005
@@ -206,9 +206,14 @@
     }
 
     private HttpMutableResponse createResponse(int status) {
-        HttpVersion ver = this.httpreq.getRequestLine().getHttpVersion();
-        BasicHttpResponse response = new BasicHttpResponse(new StatusLine(ver, status));
-    	response.getParams().setDefaults(this.httpreq.getParams());
+        BasicHttpResponse response = new BasicHttpResponse();
+    	response.getParams().setDefaults(this.params);
+        if (this.httpreq != null) {
+            HttpVersion ver = this.httpreq.getRequestLine().getHttpVersion();
+            response.setStatusLine(new StatusLine(ver, status));
+        } else {
+            response.setStatusCode(status);
+        }
     	return response;
     }
     



Mime
View raw message