There are some problems with encoding/decoding which have yet to be resolved.
There may well be a Bugzilla issue for this particular problem; if so
feel free to add any new information to it.
If not, please create a new Bugzilla issue with the details from this e-mail.
Thanks.
Note that patches are of course welcome, but they must not break any
correct behaviour and/or functionality.
On 14/03/07, Olivier Schmitt <[EMAIL PROTECTED]> wrote:
Hi,
i'm using jmeter 2.2.
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 :
...
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 !!!
So, 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
Any idea ?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]