Bug 53068 - Cannot POST a "%" character - URLDecoder executes multiple times
Summary: Cannot POST a "%" character - URLDecoder executes multiple times
Status: RESOLVED DUPLICATE of bug 52613
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.6
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-12 20:09 UTC by aj heller
Modified: 2012-04-13 14:53 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description aj heller 2012-04-12 20:09:40 UTC
Saving the Test Plan apparently passes an HTTP Request's Raw Post Body through URLDecoder 3 times. Running the Test Plan passes it through URLDecoder once.

I need to post XML content to a web service, and that content includes a "%" symbol. I can either escape it 4x to save and run (e.g. "%25252525"), or escape once and run (e.g. "%25"). After either case, saving or running the Test Plan mangles my Post Body, so I have to start over.

To illustrate the problem quickly, create an HTTP Request with "%%" alone in the post body and save. You should get "Problem updating GUI - see log for details". The first error in the log (among a few) is:

2012/04/12 12:38:59 ERROR - jmeter.gui.GuiPackage: Problem retrieving gui java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "%?"
	at java.net.URLDecoder.decode(Unknown Source)
	at org.apache.jmeter.protocol.http.util.HTTPArgument.<init>(HTTPArgument.java:113)
	at org.apache.jmeter.protocol.http.util.HTTPArgument.<init>(HTTPArgument.java:95)
	at org.apache.jmeter.protocol.http.config.gui.UrlConfigGui.modifyTestElement(UrlConfigGui.java:202)
	at org.apache.jmeter.protocol.http.config.gui.MultipartUrlConfigGui.modifyTestElement(MultipartUrlConfigGui.java:60)
	at org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui.modifyTestElement(HttpTestSampleGui.java:115)
	at org.apache.jmeter.gui.GuiPackage.updateCurrentNode(GuiPackage.java:415)
	at org.apache.jmeter.gui.GuiPackage.updateCurrentGui(GuiPackage.java:396)
	at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:72)
	at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:41)
	at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:62)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$000(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Comment 1 Philippe Mouawad 2012-04-13 07:09:34 UTC
Hello,
 Think this issue duplicates 52613 and has been fixed in nightly build.
Can you download it and Check if it's the case and if not reopen thé issue?
Thanks

*** This bug has been marked as a duplicate of bug 52613 ***
Comment 2 aj heller 2012-04-13 14:53:47 UTC
Running nightly-r1325640 does fix this problem for me. Thank you.
Comment 3 The ASF infrastructure team 2022-09-24 20:37:49 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2805