When user agent submit a request which is POST/Multipart to Jmeter Http Proxy server, for the key and value arguments,value filed is being trimmed which is totally wrong. what if the value field is depend on the space? i figured out where is the problem and its in org.apache.jmeter.protocol.http.config.MultipartUrlConfig i added the below code in parseArquments method and removed the trim part /* * Bug Fix * Do not trim the value,just remove the extra char's appended with value in the process. * value always contains \n\r\n<value>\r\n */ if(value!=null) { if(value.length()>=3&&value.substring(0,3).equals("\n\r\n")) { value=value.substring(3); } if(value.length()>=2&&value.substring(value.length()-2).equals("\r\n")) { value=value.substring(0,value.length()-2); } } Please let me know if you need any more info.
Thanks! I agree, there is a problem with the parsing of values - it should only strip the initial blank line and the trailing EOL. BTW, I'm not quite sure why the code allows for "\n\n" (LFLF); AFAIK, CRLF is the only permitted EOL marker. However I think that option should be kept for now.
I've just tried to generate form data with trailing spaces in browsers, but IE, FF and Opera all convert trailing spaces to +. So what user agent caused the problem for you?
Keep the form as multipart so that it will be sent as it is I used FF. (In reply to comment #2) > I've just tried to generate form data with trailing spaces in browsers, but IE, > FF and Opera all convert trailing spaces to +. > > So what user agent caused the problem for you?
Thanks! I'd not specified the enctype. Adding enctype="multipart/form-data" now works with FF.
Fixed in SVN: URL: http://svn.apache.org/viewvc?rev=1041406&view=rev Log: Bug 50392 - value is trimmed when sending the request in Multipart Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/MultipartUrlConfig.java jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/config/MultipartUrlConfigTest.java jakarta/jmeter/trunk/xdocs/changes.xml
Thank you .You are Amazing!.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2433