https://bz.apache.org/bugzilla/show_bug.cgi?id=64267
Bug ID: 64267
Summary: when preemptive auth is disabled HTTP Sampler does not
automatically respond to Basic Auth challenge
Product: JMeter
Version: 5.2.1
Hardware: PC
OS: Mac OS X 10.1
Status: NEW
Severity: normal
Priority: P2
Component: HTTP
Assignee: issues@jmeter.apache.org
Reporter: ply...@apache.org
Target Milestone: JMETER_5.3.0
Created attachment 37121
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37121=edit
reproduce test case
This page:
https://jmeter.apache.org/usermanual/component_reference.html#HTTP_Authorization_Manager
States:
"The HttpComponents (HC 4.5.X) implementation defaults to pre-emptive since 3.2
and the header will be shown. To disable this, set the values as below, in
which case authentication will only be performed in response to a challenge.
In the file jmeter.properties set httpclient4.auth.preemptive=false
"
This statement suggests to me that when the property is set to false, that the
HTTP sampler using HC will automatically respond to an auth challenge if it has
access to an HTTP Authorization Manager with appropriate credentials.
The attached test case and jmeter.log suggests this is not the case. I added a
Response Assertion with Ignore Status enabled checking for a 200 response code.
The assertion fails because 401 is received and the logs show no challenge
response is automatically sent.
Expected:
When httpclient4.auth.preemptive=false and HC HTTP Sampler is used, then HTTP
sampler should automatically respond to an Auth challenge if credentials are
present via an HTTP Authorization Manager. Subsequently a response assertion
testing for status code, should be able to test against the response code of
the second request sent by the sampler with its credentials - instead of the
first response challenge (401).
I realize there might be use cases the verify a challenge response
code/headers/etc. and I don't wish to remove that ability. But I do believe the
automatic challenge request by the HTTP Sampler also worked at one point in
jmeter history, thus I filed this as bug, not enhancement.
--
You are receiving this mail because:
You are the assignee for the bug.