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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to