You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by al...@apache.org on 2007/10/16 18:05:01 UTC

svn commit: r585179 - /jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java

Author: alf
Date: Tue Oct 16 09:04:50 2007
New Revision: 585179

URL: http://svn.apache.org/viewvc?rev=585179&view=rev
Log:
Properly handle case were there are no data in body of request, for example HTTP GET.

Modified:
    jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java

Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java?rev=585179&r1=585178&r2=585179&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java (original)
+++ jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java Tue Oct 16 09:04:50 2007
@@ -135,7 +135,11 @@
                 }
             }
             else {
-                log.error("No content-length header found, and it is not chunked transfer, we cannot read the request");
+                // The reqest has no body, or it has a transfer encoding we do not support.
+                // In either case, we read any data available
+                while(in.available() > 0 && ((length = in.read(buffer)) != -1)) {
+                    out.write(buffer, 0, length);
+                }
             }
             out.flush();
         } catch (Exception e) {



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