tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1033414 - /tomcat/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java
Date Wed, 10 Nov 2010 11:08:31 GMT
Author: markt
Date: Wed Nov 10 11:08:31 2010
New Revision: 1033414

URL: http://svn.apache.org/viewvc?rev=1033414&view=rev
Log:
kkolinko's additional test case for https://issues.apache.org/bugzilla/show_bug.cgi?id=49860
Test for correct handling if read buffer is filled and then re-used

Modified:
    tomcat/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java

Modified: tomcat/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java?rev=1033414&r1=1033413&r2=1033414&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java (original)
+++ tomcat/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java Wed Nov
10 11:08:31 2010
@@ -46,7 +46,7 @@ public class TestChunkedInputFilter exte
 
         tomcat.start();
 
-        String request =
+        String[] request = new String[]{
             "POST /echo-params.jsp HTTP/1.1" + SimpleHttpClient.CRLF +
             "Host: any" + SimpleHttpClient.CRLF +
             "Transfer-encoding: chunked" + SimpleHttpClient.CRLF +
@@ -59,16 +59,16 @@ public class TestChunkedInputFilter exte
             "4" + SimpleHttpClient.CRLF +
             "&b=1" + SimpleHttpClient.CRLF +
             "0" + SimpleHttpClient.CRLF +
-            "x-trailer: TestTestTest" + SimpleHttpClient.CRLF +
-            SimpleHttpClient.CRLF;
+            "x-trailer: Test", "TestTest0123456789abcdefghijABCDEFGHIJopqrstuvwxyz" + SimpleHttpClient.CRLF
+
+            SimpleHttpClient.CRLF };
 
         TrailerClient client = new TrailerClient();
         client.setPort(getPort());
-        client.setRequest(new String[] {request});
+        client.setRequest(request);
 
         client.connect();
         client.processRequest();
-        assertEquals("null7TestTestTest", client.getResponseBody());
+        assertEquals("null7TestTestTest0123456789abcdefghijABCDEFGHIJopqrstuvwxyz", client.getResponseBody());
     }
     
     public void testNoTrailingHeaders() throws Exception {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message