[GitHub] jmeter pull request #413: Enhancement 62829 - Allow specifying proxy scheme ...
Github user asfgit closed the pull request at: https://github.com/apache/jmeter/pull/413 ---
[GitHub] jmeter pull request #413: Enhancement 62829 - Allow specifying proxy scheme ...
Github user pmouawad commented on a diff in the pull request: https://github.com/apache/jmeter/pull/413#discussion_r23521 --- Diff: docs/usermanual/get-started.html --- @@ -930,6 +930,11 @@ 1.4.3 Using JMeter behind a proxy + --- End diff -- To update documentation, update xdocs/usermanual/get-started.xml as html are generated from xml, thanks ---
[GitHub] jmeter pull request #413: Enhancement 62829 - Allow specifying proxy scheme ...
Github user pmouawad commented on a diff in the pull request: https://github.com/apache/jmeter/pull/413#discussion_r23500 --- Diff: src/core/org/apache/jmeter/JMeter.java --- @@ -746,13 +751,15 @@ private void setProxy(CLArgsParser parser) throws IllegalUserActionException { } } if (parser.getArgumentById(PROXY_HOST) != null && parser.getArgumentById(PROXY_PORT) != null) { +String scheme = parser.getArgumentById(PROXY_SCHEME).getArgument(); String h = parser.getArgumentById(PROXY_HOST).getArgument(); String p = parser.getArgumentById(PROXY_PORT).getArgument(); +System.setProperty("http.proxyScheme", scheme );// $NON-NLS-1$ --- End diff -- Should be set only if not blank/null ---
[GitHub] jmeter pull request #413: Enhancement 62829 - Allow specifying proxy scheme ...
Github user hitesh22 commented on a diff in the pull request: https://github.com/apache/jmeter/pull/413#discussion_r229147047 --- Diff: src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java --- @@ -1037,7 +1044,7 @@ private CloseableHttpClient setupClient(JMeterVariables jMeterVariables, URL url // Set up proxy details if(useProxy) { -HttpHost proxy = new HttpHost(proxyHost, proxyPort); +HttpHost proxy = new HttpHost(proxyHost, proxyPort, proxyScheme); --- End diff -- @pmouawad Added above at line 950: proxyScheme = StringUtils.isBlank(proxyScheme) ? null : proxyScheme; ---
[GitHub] jmeter pull request #413: Enhancement 62829 - Allow specifying proxy scheme ...
Github user pmouawad commented on a diff in the pull request: https://github.com/apache/jmeter/pull/413#discussion_r228741947 --- Diff: src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java --- @@ -1037,7 +1044,7 @@ private CloseableHttpClient setupClient(JMeterVariables jMeterVariables, URL url // Set up proxy details if(useProxy) { -HttpHost proxy = new HttpHost(proxyHost, proxyPort); +HttpHost proxy = new HttpHost(proxyHost, proxyPort, proxyScheme); --- End diff -- If proxyScheme is empty, then it should be passed as null so that default (HTTP) is used. ---
[GitHub] jmeter pull request #413: Enhancement 62829 - Allow specifying proxy scheme ...
GitHub user hitesh22 opened a pull request: https://github.com/apache/jmeter/pull/413 Enhancement 62829 - Allow specifying proxy scheme to use ## Description A proxy could be running using https but currently there is no way to specify it. This enhancement allows user to specify proxy scheme to use. ## Motivation and Context https://bz.apache.org/bugzilla/show_bug.cgi?id=62829 ## How Has This Been Tested? ant package-and-check ant test Tested using ant run_gui Tested on Mac and using on Ubuntu headless tests. Using these changes with a proxy server using https ## Screenshots (if appropriate): Attached to bugzilla ticket. ## Types of changes - New feature (non-breaking change which adds functionality) ## Checklist: - [ x] My code follows the [code style][style-guide] of this project. - [ ] I have updated the documentation accordingly. [style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines You can merge this pull request into a Git repository by running: $ git pull https://github.com/hitesh22/jmeter 62829 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/jmeter/pull/413.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #413 commit 5f5b5318f98f0c6e74d75326b5c653c72f2919aa Author: hitesh Date: 2018-10-27T19:01:44Z Enhancement 62829 - Allow specifying proxy scheme to use Motivation and Context A proxy could be running using https but currently there is no way to specify it. This enhancement allows user to specify proxy scheme to use. https://bz.apache.org/bugzilla/show_bug.cgi?id=62829 How Has This Been Tested? Tested using ant run_gui Tested on Mac and using on Ubuntu headless tests. Only added functionality to code Types of changes Enhancement (non-breaking change which fixes an issue) Checklist: [x ] My code follows the code style of this project. ---