Is JMeter URL encoding everything through the HTTP Proxy? This is how to fix it!

I was having problems with JMeter URL encoding everything through the HTTP proxy which was causing me serious grief. One application I’m performance testing sends XML over HTTP, which when URL encoded turns <” symbols into %3Es and other weird things that make servers panic and fail.

I made sure that encoding was switched off when the sampler was run, but that didn’t fix the problem. I checked data flowing through the JMeter HTTP Proxy and encoding was happening there compared to the normal application. Wireshark was great to figure this out.

The problem? The sampler HTTP Request HTTPClient. This is the Apache sampler and is generally better than HTTP Request in most situations I’ve been told. This is one situation where it wasn’t. I switched to HTTP Request, and all my dramas went away.