You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2017/02/26 20:04:01 UTC
svn commit: r1784480 -
/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java
Author: pmouawad
Date: Sun Feb 26 20:04:00 2017
New Revision: 1784480
URL: http://svn.apache.org/viewvc?rev=1784480&view=rev
Log:
In case of automatic redirect with Java Implementation, client sends an empty header
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java
Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java?rev=1784480&r1=1784479&r2=1784480&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HttpMirrorThread.java Sun Feb 26 20:04:00 2017
@@ -110,6 +110,10 @@ public class HttpMirrorThread implements
baos.close();
final String headerString = headers.toString();
+ if(headerString.length() == 0 || headerString.indexOf('\r') < 0) {
+ log.error("Invalid request received:'{}'", headerString);
+ return;
+ }
final String firstLine = headerString.substring(0, headerString.indexOf('\r'));
final String[] requestParts = firstLine.split("\\s+");
final String requestMethod = requestParts[0];