https://bz.apache.org/bugzilla/show_bug.cgi?id=63298

            Bug ID: 63298
           Summary: HTTP Requests with encoded URLs are being sent in
                    decoded format
           Product: JMeter
           Version: 5.1.1
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTTP
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: JMETER_5.1.1

We have performance tests written in jmeter4 that work without issue.  When
upgrading to jmeter5, we find that some of our http requests against paths with
encoded URLs are failing.

In addition in the jmeter "view results tree" view it appears the url is
submitted properly in an encoded format, but enabling debug tracing in jmeter
reveals it's actually sent on the wire in decoded format, which is failing.

Here is some logging to show:

Sample start showing the URL (encoded).  This is also what appears on the view
results tree view.

2019-03-27 16:04:22,342 DEBUG o.a.j.p.h.s.HTTPHC4Impl: Start : sample
https://na1.mist60.stm.salesforce.com/l/%7B%22mode%22%3A%22PROD%22%2C%22app%22%3A%22one%3Aone%22%2C%22fwuid%22%3A%22BD4UGoez245sNnTgn1sJJg%22%2C%22loaded%22%3A%7B%22APPLICATION%40markup%3A%2F%2Fone%3Aone%22%3A%22135UFXBjK_Gvtd9UYV4RBg%22%7D%2C%22pathPrefix%22%3A%22%22%2C%22ls%22%3A1%7D/inline.js?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..f0IY0OClHp9yDCIRblhyGsZ6nZTWQ3wm7KNHTqHFHnU
method GET followingRedirect false depth 0
2019-03-27 16:04:22,342 DEBUG o.a.j.p.h.s.HTTPHC4Impl: Reusing the HttpClient:
@1408486438 https://na1.mist60.stm.salesforce.com
2019-03-27 16:04:22,343 DEBUG o.a.j.p.h.c.HC4CookieHandler: Found 13 cookies
for
https://na1.mist60.stm.salesforce.com/l/%7B%22mode%22%3A%22PROD%22%2C%22app%22%3A%22one%3Aone%22%2C%22fwuid%22%3A%22BD4UGoez245sNnTgn1sJJg%22%2C%22loaded%22%3A%7B%22APPLICATION%40markup%3A%2F%2Fone%3Aone%22%3A%22135UFXBjK_Gvtd9UYV4RBg%22%7D%2C%22pathPrefix%22%3A%22%22%2C%22ls%22%3A1%7D/inline.js?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..f0IY0OClHp9yDCIRblhyGsZ6nZTWQ3wm7KNHTqHFHnU
2019-03-27 16:04:22,343 DEBUG o.a.j.p.h.s.HTTPHC4Impl: Found user token:Thread
Group 1-1 as JMeter variable:__jmeter.U_T__, storing it in HttpContext
2019-03-27 16:04:22,343 DEBUG o.a.h.c.p.RequestAddCookies: CookieSpec selected:
default
2019-03-27 16:04:22,343 DEBUG o.a.h.c.p.RequestAddCookies: Unsupported cookie
policy: default
2019-03-27 16:04:22,343 DEBUG o.a.h.c.p.RequestAuthCache: Auth cache not set in
the context
2019-03-27 16:04:22,343 DEBUG o.a.h.i.c.PoolingHttpClientConnectionManager:
Connection request: [route:
{s}->https://na1.mist60.stm.salesforce.com:443][state: Thread Group 1-1][total
kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
2019-03-27 16:04:22,343 DEBUG o.a.h.i.c.PoolingHttpClientConnectionManager:
Connection leased: [id: 24][route:
{s}->https://na1.mist60.stm.salesforce.com:443][state: Thread Group 1-1][total
kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
2019-03-27 16:04:22,343 DEBUG o.a.h.i.c.DefaultManagedHttpClientConnection:
http-outgoing-24: set socket timeout to 0 

See decoded requests here:

2019-03-27 16:04:22,343 DEBUG o.a.h.i.e.MainClientExec: Executing request GET
/l/%7B%22mode%22:%22PROD%22,%22app%22:%22one:one%22,%22fwuid%22:%22BD4UGoez245sNnTgn1sJJg%22,%22loaded%22:%7B%22APPLICATION@markup:/one:one%22:%22135UFXBjK_Gvtd9UYV4RBg%22%7D,%22pathPrefix%22:%22%22,%22ls%22:1%7D/inline.js?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..f0IY0OClHp9yDCIRblhyGsZ6nZTWQ3wm7KNHTqHFHnU
HTTP/1.1 
2019-03-27 16:04:22,343 DEBUG o.a.h.i.e.MainClientExec: Target auth state:
UNCHALLENGED
2019-03-27 16:04:22,343 DEBUG o.a.h.i.e.MainClientExec: Proxy auth state:
UNCHALLENGED
2019-03-27 16:04:22,344 DEBUG o.a.h.headers: http-outgoing-24 >> GET
/l/%7B%22mode%22:%22PROD%22,%22app%22:%22one:one%22,%22fwuid%22:%22BD4UGoez245sNnTgn1sJJg%22,%22loaded%22:%7B%22APPLICATION@markup:/one:one%22:%22135UFXBjK_Gvtd9UYV4RBg%22%7D,%22pathPrefix%22:%22%22,%22ls%22:1%7D/inline.js?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..f0IY0OClHp9yDCIRblhyGsZ6nZTWQ3wm7KNHTqHFHnU
HTTP/1.1


Workaround:
Using the HTTP Request Defaults config option - if you set the client
implementation to "java" explicitly, the requests work.

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

Reply via email to