Bug 54057 - Proxy option to set user and password at startup (-u and -a) not working with HTTPClient 4
Proxy option to set user and password at startup (-u and -a) not working with...
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: HTTP
2.8
PC All
: P2 normal (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-10-26 14:52 UTC by stef
Modified: 2012-11-30 11:20 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stef 2012-10-26 14:52:22 UTC
Starting JMeter with option -H myproxy -P 1234 -u user -a password will work only with HTTPClient 3.1 et Java implementation. If used with HTTPClient 4, the sampler returns 407 error.
Comment 1 Philippe Mouawad 2012-10-26 20:42:10 UTC
Is it working when you set proxy config on Sampler in "Proxy Server" part ?
Comment 2 stef 2012-10-27 09:36:38 UTC
Hi,

No, same behavior if configured in the sampler. Works with Java and HTTPClient 3.1, vith v4 always 407 error.

Stef
Comment 3 Philippe Mouawad 2012-10-27 12:41:10 UTC
Thank you,  what kind of authentication is your proxy using ?.
The difference between 3.1 and 4 is that 3.1 uses NTCredential while 4 uses UsernamePasswordCredentials
Comment 4 stef 2012-10-27 12:48:11 UTC
it is user/name password I assume as with a browser it prompts for it.

Stef
Comment 5 Sebb 2012-11-01 15:22:34 UTC
Hopefully now fixed.

Please re-open with details if the fix has not worked.

URL: http://svn.apache.org/viewvc?rev=1404638&view=rev
Log:
Proxy option to set user and password at startup (-u and -a) not working with HTTPClient 4
Align code with HC3 implementation: use NTCredentials throughout the HC4 implementation
Bugzilla Id: 54057

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java

URL: http://svn.apache.org/viewvc?rev=1404639&view=rev
Log:
Proxy option to set user and password at startup (-u and -a) not working with HTTPClient 4
Bugzilla Id: 54057

Modified:
    jmeter/trunk/xdocs/changes.xml
Comment 6 Philippe Mouawad 2012-11-05 08:26:19 UTC
I made a test with new code, at least it does not break proxy authentication when it already worked.

Stephane, hope you can give us some feedback soon as I cannot reproduce issue with HTTP4Impl with our proxy.

Regards
Comment 7 stef 2012-11-05 12:13:56 UTC
Hi,

I still have the same behavior with r1405729. Works with HC 3.1 and Java but not HC 4...

Stef
Comment 8 Philippe Mouawad 2012-11-05 12:35:48 UTC
Can you attach a simple test case showing the issue and log file ?
Comment 9 Philippe Mouawad 2012-11-06 21:43:12 UTC
Can you try with nightly build.
We upgraded HTTPComponents library to 4.2.2 which contains fixes around preemptive authentication.

Thank you
Comment 10 Philippe Mouawad 2012-11-12 21:13:23 UTC
Hello Stephane,
Any news on that ?
Comment 11 stef 2012-11-14 11:55:38 UTC
Hi,

Still same issues with r1408979. Do you want logs and if yes which component needs to be set to debug mode ?

Stef
Comment 12 Philippe Mouawad 2012-11-30 11:18:55 UTC
Date: Fri Nov 30 11:16:08 2012
New Revision: 1415587

URL: http://svn.apache.org/viewvc?rev=1415587&view=rev
Log:
Bug 54057 - Proxy option to set user and password at startup (-u and -a) not working with HTTPClient 4
Bugzilla Id: 54057

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
    jmeter/trunk/xdocs/changes.xml
Comment 13 Philippe Mouawad 2012-11-30 11:20:05 UTC
Hello Stef,
I managed to reproduce it and fixed it now.

Can you confirm it's OK on your side with next nightly build ?

Regards
Philippe