You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by se...@apache.org on 2013/08/29 20:27:07 UTC
svn commit: r1518747 - in /jmeter/trunk:
src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
xdocs/changes.xml
Author: sebb
Date: Thu Aug 29 18:27:07 2013
New Revision: 1518747
URL: http://svn.apache.org/r1518747
Log:
Proxy generates empty http:/ entries when recording
Bugzilla Id: 55502
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
jmeter/trunk/xdocs/changes.xml
Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java?rev=1518747&r1=1518746&r2=1518747&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java Thu Aug 29 18:27:07 2013
@@ -54,6 +54,7 @@ import org.apache.jmeter.samplers.Sample
import org.apache.jmeter.testelement.TestElement;
import org.apache.jmeter.util.JMeterUtils;
import org.apache.jorphan.logging.LoggingManager;
+import org.apache.jorphan.util.JMeterException;
import org.apache.jorphan.util.JOrphanUtils;
import org.apache.log.Logger;
@@ -180,6 +181,10 @@ public class Proxy extends Thread {
try {
// Now, parse initial request (in case it is a CONNECT request)
byte[] ba = request.parse(new BufferedInputStream(clientSocket.getInputStream()));
+ if (ba.length == 0) {
+ log.warn(port + "Empty request, ignored");
+ throw new JMeterException(); // hack to skip processing
+ }
if (log.isDebugEnabled()) {
log.debug(port + "Initial request: " + new String(ba));
}
@@ -228,6 +233,8 @@ public class Proxy extends Thread {
writeToClient(result, new BufferedOutputStream(clientSocket.getOutputStream()));
samplerCreator.postProcessSampler(sampler, result);
+ } catch (JMeterException jme) {
+ // ignored, already processed
} catch (UnknownHostException uhe) {
log.warn(port + "Server Not Found.", uhe);
writeErrorToClient(HttpReplyHdr.formServerNotFound());
Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1518747&r1=1518746&r2=1518747&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Thu Aug 29 18:27:07 2013
@@ -249,6 +249,7 @@ Previously the default was 1, which coul
<li><bugzilla>55388</bugzilla> - HC3 does not allow IP Source field to override httpclient.localaddress.</li>
<li><bugzilla>55450</bugzilla> - HEAD redirects should remain as HEAD</li>
<li><bugzilla>55455</bugzilla> - HTTPS with HTTPClient4 ignores cps setting</li>
+<li><bugzilla>55502</bugzilla> - Proxy generates empty http:/ entries when recording</li>
</ul>
<h3>Other Samplers</h3>