[Bug 64267] when preemptive auth is disabled HTTP Sampler does not automatically respond to Basic Auth challenge

2020-03-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64267

--- Comment #1 from Peter Lynch  ---
Created attachment 37122
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37122=edit
log from running reproduce case with log level DEBUG

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 64267] New: when preemptive auth is disabled HTTP Sampler does not automatically respond to Basic Auth challenge

2020-03-25 Thread bugzilla
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.

[Bug 64227] Template Error

2020-03-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64227

--- Comment #3 from Felix Schumacher  ---
commit 33e23b80ebf7c769950c8d3852281f1cd63ad35d
Author: Felix Schumacher 
AuthorDate: Wed Mar 25 16:23:40 2020 +0100

Use correct conversion for URLs to File

After using File directly for TemplateManager the tests failed for Files
that are created by reading resources from classes, when those resources
are located inside of directories containing spaces.

Use Paths API to convert the URIs to Files that have correctly decoded
names.

Bugzilla Id: 64227
---
 .../jmeter/gui/action/template/TestTemplateManager.java   | 15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.