hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r348804 - in /jakarta/httpcomponents/trunk/http-core/src: java/org/apache/http/impl/ java/org/apache/http/io/ java/org/apache/http/util/ test/org/apache/http/util/
Date Thu, 24 Nov 2005 21:11:31 GMT
Author: olegk
Date: Thu Nov 24 13:11:17 2005
New Revision: 348804

URL: http://svn.apache.org/viewcvs?rev=348804&view=rev
Log:
Renamed HeadersParser class to HeaderParser

Added:
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/util/HeaderParser.java
      - copied, changed from r348786, jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/util/HeadersParser.java
Removed:
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/util/HeadersParser.java
Modified:
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ChunkedInputStream.java
    jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/util/TestHeadersParser.java

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java?rev=348804&r1=348803&r2=348804&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
Thu Nov 24 13:11:17 2005
@@ -56,7 +56,7 @@
 import org.apache.http.io.SocketFactory;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.HttpProtocolParams;
-import org.apache.http.util.HeadersParser;
+import org.apache.http.util.HeaderParser;
 
 /**
  * <p>
@@ -306,7 +306,7 @@
 
     protected void readResponseHeaders(
             final HttpMutableResponse response) throws HttpException, IOException {
-        Header[] headers = HeadersParser.processHeaders(this.datareceiver);
+        Header[] headers = HeaderParser.parse(this.datareceiver);
         for (int i = 0; i < headers.length; i++) {
             response.addHeader(headers[i]);
             if (isWirelogEnabled()) {

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java?rev=348804&r1=348803&r2=348804&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpServerConnection.java
Thu Nov 24 13:11:17 2005
@@ -48,7 +48,7 @@
 import org.apache.http.impl.entity.EntityGenerator;
 import org.apache.http.impl.entity.EntityWriter;
 import org.apache.http.params.HttpParams;
-import org.apache.http.util.HeadersParser;
+import org.apache.http.util.HeaderParser;
 
 /**
  * <p>
@@ -118,7 +118,7 @@
     
     protected void receiveRequestHeaders(final HttpMutableRequest request) 
             throws HttpException, IOException {
-        Header[] headers = HeadersParser.processHeaders(this.datareceiver);
+        Header[] headers = HeaderParser.parse(this.datareceiver);
         for (int i = 0; i < headers.length; i++) {
             request.addHeader(headers[i]);
             if (isWirelogEnabled()) {

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ChunkedInputStream.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ChunkedInputStream.java?rev=348804&r1=348803&r2=348804&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ChunkedInputStream.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/io/ChunkedInputStream.java
Thu Nov 24 13:11:17 2005
@@ -35,7 +35,7 @@
 import org.apache.http.Header;
 import org.apache.http.HttpException;
 import org.apache.http.util.ExceptionUtils;
-import org.apache.http.util.HeadersParser;
+import org.apache.http.util.HeaderParser;
 
 /**
  * <p>This class implements chunked transfer coding as described in the 
@@ -289,7 +289,7 @@
      */
     private void parseTrailerHeaders() throws IOException {
         try {
-            this.footers = HeadersParser.processHeaders(in);
+            this.footers = HeaderParser.parse(in);
         } catch (HttpException e) {
             IOException ioe = new MalformedChunkCodingException("Invalid footer: " 
                     + e.getMessage());

Copied: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/util/HeaderParser.java
(from r348786, jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/util/HeadersParser.java)
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/util/HeaderParser.java?p2=jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/util/HeaderParser.java&p1=jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/util/HeadersParser.java&r1=348786&r2=348804&rev=348804&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/util/HeadersParser.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/util/HeaderParser.java
Thu Nov 24 13:11:17 2005
@@ -48,12 +48,12 @@
  * 
  * @since 4.0
  */
-public class HeadersParser  {
+public class HeaderParser  {
 
-    private HeadersParser() {
+    private HeaderParser() {
     }
     
-    public static Header[] processHeaders(final HttpDataReceiver datareceiver) 
+    public static Header[] parse(final HttpDataReceiver datareceiver) 
             throws HttpException, IOException {
         ArrayList headerLines = new ArrayList();
         

Modified: jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/util/TestHeadersParser.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/util/TestHeadersParser.java?rev=348804&r1=348803&r2=348804&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/util/TestHeadersParser.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/util/TestHeadersParser.java
Thu Nov 24 13:11:17 2005
@@ -38,7 +38,7 @@
 import junit.framework.TestSuite;
 
 /**
- * Unit tests for {@link HeadersParser}.
+ * Unit tests for {@link HeaderParser}.
  *
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
  */
@@ -67,7 +67,7 @@
             "     \r\n" +  
             "\r\n"; 
         HttpDataReceiver receiver = new HttpDataReceiverMockup(s, "US-ASCII"); 
-        Header[] headers = HeadersParser.processHeaders(receiver);
+        Header[] headers = HeaderParser.parse(receiver);
         assertNotNull(headers);
         assertEquals(3, headers.length);
         assertEquals("header1", headers[0].getName());
@@ -83,7 +83,7 @@
             "    header1: stuff\r\n" + 
             "header2  : stuff \r\n"; 
         HttpDataReceiver receiver = new HttpDataReceiverMockup(s, "US-ASCII"); 
-        Header[] headers = HeadersParser.processHeaders(receiver);
+        Header[] headers = HeaderParser.parse(receiver);
         assertNotNull(headers);
         assertEquals(2, headers.length);
         assertEquals("header1", headers[0].getName());
@@ -95,7 +95,7 @@
     public void testEmptyDataStream() throws Exception {
         String s = ""; 
         HttpDataReceiver receiver = new HttpDataReceiverMockup(s, "US-ASCII"); 
-        Header[] headers = HeadersParser.processHeaders(receiver);
+        Header[] headers = HeaderParser.parse(receiver);
         assertNotNull(headers);
         assertEquals(0, headers.length);
     }



Mime
View raw message