hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r418585 - in /jakarta/httpcomponents/tcconnector/trunk/src/java/org/apache/http/tcconnector/impl: CoyoteHttpConnectionImpl.java HttpConnectionProcessor.java
Date Sun, 02 Jul 2006 12:19:12 GMT
Author: olegk
Date: Sun Jul  2 05:19:12 2006
New Revision: 418585

URL: http://svn.apache.org/viewvc?rev=418585&view=rev
Log:
[HTTPCORE-5] Made NameValuePair, StatusLine, RequestLine interfaces

Modified:
    jakarta/httpcomponents/tcconnector/trunk/src/java/org/apache/http/tcconnector/impl/CoyoteHttpConnectionImpl.java
    jakarta/httpcomponents/tcconnector/trunk/src/java/org/apache/http/tcconnector/impl/HttpConnectionProcessor.java

Modified: jakarta/httpcomponents/tcconnector/trunk/src/java/org/apache/http/tcconnector/impl/CoyoteHttpConnectionImpl.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/tcconnector/trunk/src/java/org/apache/http/tcconnector/impl/CoyoteHttpConnectionImpl.java?rev=418585&r1=418584&r2=418585&view=diff
==============================================================================
--- jakarta/httpcomponents/tcconnector/trunk/src/java/org/apache/http/tcconnector/impl/CoyoteHttpConnectionImpl.java
(original)
+++ jakarta/httpcomponents/tcconnector/trunk/src/java/org/apache/http/tcconnector/impl/CoyoteHttpConnectionImpl.java
Sun Jul  2 05:19:12 2006
@@ -50,7 +50,6 @@
 import org.apache.http.HttpVersion;
 import org.apache.http.ProtocolException;
 import org.apache.http.RequestLine;
-import org.apache.http.StatusLine;
 import org.apache.http.impl.DefaultHttpRequestFactory;
 import org.apache.http.impl.io.SocketHttpDataReceiver;
 import org.apache.http.impl.io.SocketHttpDataTransmitter;
@@ -64,6 +63,8 @@
 import org.apache.http.io.HttpDataTransmitter;
 import org.apache.http.io.IdentityOutputStream;
 import org.apache.http.message.BasicHeader;
+import org.apache.http.message.BasicRequestLine;
+import org.apache.http.message.BasicStatusLine;
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.HTTP;
@@ -171,7 +172,7 @@
         if (i == -1) {
             throw new ConnectionClosedException("Client closed connection"); 
         }
-        RequestLine requestline = RequestLine.parse(this.charbuffer, 0, this.charbuffer.length());
+        RequestLine requestline = BasicRequestLine.parse(this.charbuffer, 0, this.charbuffer.length());
         HttpRequest request = this.requestfactory.newHttpRequest(requestline);
         request.getParams().setDefaults(params);
         Header[] headers = HeaderUtils.parseHeaders(this.datareceiver, this.maxHeaderCount);
@@ -232,7 +233,7 @@
             throw new IllegalArgumentException("HTTP response may not be null");
         }
         this.charbuffer.clear();
-        StatusLine.format(this.charbuffer, response.getStatusLine());
+        BasicStatusLine.format(this.charbuffer, response.getStatusLine());
         this.datatransmitter.writeLine(this.charbuffer);
         for (Iterator it = response.headerIterator(); it.hasNext(); ) {
             this.charbuffer.clear();

Modified: jakarta/httpcomponents/tcconnector/trunk/src/java/org/apache/http/tcconnector/impl/HttpConnectionProcessor.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/tcconnector/trunk/src/java/org/apache/http/tcconnector/impl/HttpConnectionProcessor.java?rev=418585&r1=418584&r2=418585&view=diff
==============================================================================
--- jakarta/httpcomponents/tcconnector/trunk/src/java/org/apache/http/tcconnector/impl/HttpConnectionProcessor.java
(original)
+++ jakarta/httpcomponents/tcconnector/trunk/src/java/org/apache/http/tcconnector/impl/HttpConnectionProcessor.java
Sun Jul  2 05:19:12 2006
@@ -61,6 +61,7 @@
 import org.apache.http.entity.BasicHttpEntity;
 import org.apache.http.impl.DefaultConnectionReuseStrategy;
 import org.apache.http.message.BasicHttpResponse;
+import org.apache.http.message.BasicStatusLine;
 import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.AbstractHttpProcessor;
 import org.apache.http.protocol.HttpContext;
@@ -220,7 +221,7 @@
     	response.getParams().setDefaults(this.params);
         if (this.httpreq != null) {
             HttpVersion ver = this.httpreq.getRequestLine().getHttpVersion();
-            response.setStatusLine(new StatusLine(ver, status));
+            response.setStatusLine(ver, status);
         } else {
             response.setStatusCode(status);
         }
@@ -396,7 +397,7 @@
         	LOG.debug("Response phrase: " + statusPhrase);
         }
         
-        StatusLine statusline = new StatusLine(ver, statuscode, statusPhrase);
+        StatusLine statusline = new BasicStatusLine(ver, statuscode, statusPhrase);
         this.httpres = new BasicHttpResponse(statusline);
         this.httpres.getParams().setDefaults(this.params);
         MimeHeaders headers = this.coyoteres.getMimeHeaders();



Mime
View raw message