View | Details | Raw Unified | Return to bug 62852
Collapse All | Expand All

(-)src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java (+11 lines)
Lines 123-128 Link Here
123
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
123
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
124
import org.apache.http.impl.conn.SystemDefaultDnsResolver;
124
import org.apache.http.impl.conn.SystemDefaultDnsResolver;
125
import org.apache.http.impl.cookie.IgnoreSpecProvider;
125
import org.apache.http.impl.cookie.IgnoreSpecProvider;
126
import org.apache.http.message.BasicHttpRequest;
126
import org.apache.http.message.BasicNameValuePair;
127
import org.apache.http.message.BasicNameValuePair;
127
import org.apache.http.message.BufferedHeader;
128
import org.apache.http.message.BufferedHeader;
128
import org.apache.http.protocol.BasicHttpContext;
129
import org.apache.http.protocol.BasicHttpContext;
Lines 381-386 Link Here
381
382
382
    // see  https://stackoverflow.com/questions/26166469/measure-bandwidth-usage-with-apache-httpcomponents-httpclient
383
    // see  https://stackoverflow.com/questions/26166469/measure-bandwidth-usage-with-apache-httpcomponents-httpclient
383
    private static final HttpRequestExecutor REQUEST_EXECUTOR = new HttpRequestExecutor() {
384
    private static final HttpRequestExecutor REQUEST_EXECUTOR = new HttpRequestExecutor() {
385
386
        @Override
387
        public void preProcess(HttpRequest request, org.apache.http.protocol.HttpProcessor processor, HttpContext context) throws HttpException ,IOException {
388
            Object savedRequest = context.getAttribute(HttpCoreContext.HTTP_REQUEST);
389
            super.preProcess(request, processor, context);
390
            if ("CONNECT".equals(request.getRequestLine().getMethod())) {
391
                log.debug("Swap in orig http request: {} for {}", savedRequest, request);
392
                context.setAttribute(HttpCoreContext.HTTP_REQUEST, savedRequest);
393
            }
394
        };
384
395
385
        @Override
396
        @Override
386
        protected HttpResponse doSendRequest(
397
        protected HttpResponse doSendRequest(

Return to bug 62852