ASF Bugzilla – Attachment 36331 Details for
Bug 62852
HTTP Request Header missing information when using a proxy
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Revert the replacement of requests by httpclient when CONNECT is used
swap-requests.diff (text/plain), 1.62 KB, created by
Felix Schumacher
on 2018-12-14 13:03:26 UTC
(
hide
)
Description:
Revert the replacement of requests by httpclient when CONNECT is used
Filename:
MIME Type:
Creator:
Felix Schumacher
Created:
2018-12-14 13:03:26 UTC
Size:
1.62 KB
patch
obsolete
>Index: src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java >=================================================================== >--- src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java (Revision 1848778) >+++ src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java (Arbeitskopie) >@@ -123,6 +123,7 @@ > import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; > import org.apache.http.impl.conn.SystemDefaultDnsResolver; > import org.apache.http.impl.cookie.IgnoreSpecProvider; >+import org.apache.http.message.BasicHttpRequest; > import org.apache.http.message.BasicNameValuePair; > import org.apache.http.message.BufferedHeader; > import org.apache.http.protocol.BasicHttpContext; >@@ -381,6 +382,16 @@ > > // see https://stackoverflow.com/questions/26166469/measure-bandwidth-usage-with-apache-httpcomponents-httpclient > private static final HttpRequestExecutor REQUEST_EXECUTOR = new HttpRequestExecutor() { >+ >+ @Override >+ public void preProcess(HttpRequest request, org.apache.http.protocol.HttpProcessor processor, HttpContext context) throws HttpException ,IOException { >+ Object savedRequest = context.getAttribute(HttpCoreContext.HTTP_REQUEST); >+ super.preProcess(request, processor, context); >+ if ("CONNECT".equals(request.getRequestLine().getMethod())) { >+ log.debug("Swap in orig http request: {} for {}", savedRequest, request); >+ context.setAttribute(HttpCoreContext.HTTP_REQUEST, savedRequest); >+ } >+ }; > > @Override > protected HttpResponse doSendRequest(
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 62852
:
36212
|
36232
|
36233
|
36234
|
36235
|
36236
|
36237
|
36238
|
36242
|
36243
|
36323
| 36331