Bug 43984

Summary: "HTTP Request Defaults" accepts space ending "Port Number" and causes "Connection refused: connect"
Product: JMeter - Now in Github Reporter: Yang ZHONG <ZhongY>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: P2    
Version: 2.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   

Description Yang ZHONG 2007-11-28 16:04:57 UTC
"HTTP Request Defaults" Config Element accepts space ending "Port Number" and 
causes "HTTP Request" Sampler run into "Connection refused: connect".

Maybe "HTTP Request" Sampler can trim space before connecting.

Copy/Paste very easily leaves a space at the end of "HTTP Request Defaults" 
Config Element "Port Number" input. "HTTP Request" Sampler runs 
into "Connection refused: connect" without logging any hint wrt the space.

Internet search led to NAT support limitation. Wasted many time struggling w/ 
firewall, proxy & tunnelling.

Thanks.
Comment 1 Yang ZHONG 2007-11-28 17:04:47 UTC
"HTTP Request" Sampler parameter "Value" also accepts (ending) space and 
directly puts it into HTTP request w/o URL-encoding.

Maybe "HTTP Request" Sampler can either trim space or URL-encoding at least.

Thanks.
Comment 2 Sebb 2007-11-28 18:16:59 UTC
I don't consider these to be bugs as JMeter behaves correctly when correct 
data is provided.

In the case of spaces in parameter values, they are encoded if encoding is 
selected. No change is needed there.

However, I agree it would be useful to ignore trailing spaces for the port 
field. At present the port is ignored if it is not a valid number. This is a 
bit confusing - but not a bug - so I'm changing this report to an enhancement.
Comment 3 Sebb 2007-12-03 06:42:06 UTC
Trailing port spaces have been fixed in SVN r600547.
Comment 4 The ASF infrastructure team 2022-09-24 20:37:40 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2048