DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=41837>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41837 Summary: Parameter value corruption Product: JMeter Version: 2.2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P4 Component: HTTP AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] I try to record a test plan with the proxy server. My web app uses JSF 1.1. The view state is saved in HTML in hidden input control. A view state is a tree of JSF component state saved as a gzipped base64 string : Excerpt from ResponseStateManagerImpl of jsf-impl-1.1.jar ... ByteArrayOutputStream bos = new ByteArrayOutputStream(); if (compress) { zos = new GZIPOutputStream(bos); oos = new ObjectOutputStream(zos); } else { oos = new ObjectOutputStream(bos); } oos.writeObject(view.getStructure()); oos.writeObject(view.getState()); oos.close(); if (compress) { zos.close(); } bos.close(); hiddenField = " <input type=\"hidden\" name=\"" + RIConstants.FACES_VIEW + "\"" + " value=\"" + (new String(Base64.encode(bos.toByteArray()), "ISO-8859-1")) + "\" />\n "; ... sample : H4sIAAAAAAAAAO19CXgcxZV/ayRZh2UsyZLlS/YQ29gGPDrm0OGQIMuyLVY+sM3... When the current page is submitted by the browser, the proxy update the string into : H4sIAAAAAAAAAO19CXgcxZV/ayRZh2UsyZLlS/YQ29gGPDrm0OGQIMuyLVY sM3... the "+" char is missing at the end of the string !!! JSF can not deserialized the string into objects : it crashes. (UTFDataFormatException, ZipException, ...) I've remotly debugged jmeter to check when the value is altered. When Proxy class record an HTTP request every parameter of the request is always decoded. The HTTPArgument class is used to represent a request parameter. public HTTPArgument(String name, String value, boolean alreadyEncoded) { setAlwaysEncoded(true); if (alreadyEncoded) { try { name = JOrphanUtils.decode(name, "UTF-8"); value = JOrphanUtils.decode(value, "UTF-8"); } catch (UnsupportedEncodingException e) { // UTF-8 unsupported? You must be joking! log.error("UTF-8 encoding not supported!"); throw new Error(e.toString()); } } setName(name); setValue(value); setMetaData("="); } At least every parameter value is decoded with URLDecoder.decode(). My parameter value is corrupted because of this call : URLDecoder.decode("H4sIAAAAAAAAAO19CXgcxZVwz+iWZcuSJdv4HDDGds", "UTF-8") returns H4sIAAAAAAAAAO19CXgcxZVwz iWZcuSJdv4HDDGds -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
