Semicolon not supported as URL param delimiter
Brought to you by:
russgold
according to
http://www.w3.org/TR/html4/appendix/notes.html#h-B.2
section B2.2
";" should be supported as URL paramter delimiter.
httpunit supports only "&".
it fixed this problem by changing
private static final String PARAM_DELIM = "&";
into PARAM_DELIM = "&;";
in the class WebRequestSource
another change was necessary in the class WebResponse
in the method readRefreshRequest since the
StringTokenizer uses ";" as delimiter to separate the
refresh intervall from the URL.
Logged In: YES
user_id=37920
What was that other change? What case led you to believe
that it was necessary?
Logged In: YES
user_id=1133974
If you have a refresh in a web page like this:
<META HTTP-EQUIV="Refresh"
CONTENT="3;URL=http://www.myserver.com/myscript.cgi?param1=foo;param2=bar">
the URL gets truncated since httpunit uses a stringtokenizer
with delimiter ";" to separate the refresh delay from the
URL. If a semicolon is uses as parameter delimiter, the URL
gets truncated.
I fixed this by changing the method readRefreshRequest() of
the class WebResponse. see attached file.
method readRefreshRequest() of class WebResponse
Logged In: YES
user_id=1220573
Originator: NO
Dear httpunit user!
Thank you for your bug report. We appreciate the time and effort you are putting into this.
Please supply a testcase with the expected result for the bug report that you are asking a solution for and we'll look into implementing it. For a start you might want to get the trunk version from the subversion repository (see https://sourceforge.net/svn/?group_id=6550\)
and have a look at the source code of some of the more than 700 JUnit based testcase in there.
If you do not use or have subversion tool you can still directly browse our test cases via:
http://httpunit.svn.sourceforge.net/viewvc/httpunit/trunk/httpunit/test/com/meterware/httpunit/
Looking into one or more of the Junit Java source files
should give you a clue on what a proper testcase for httpunit looks like, often you will probably only have to "clone" an existing testcase and modify it slightly to your needs.
When you are ready you might want to attach the testcase (and if you already have started implementing a solution for it it also the actual code) to the patch section of the sourceforge.net tracker for patches of the httpunit project at
https://sourceforge.net/tracker/?atid=306550&group_id=6550&func=browse.
The main communication about further details of the development is via the httpunit developer mailinglist. You are most welcome to sign up via
https://lists.sourceforge.net/lists/listinfo/httpunit-develop
Yours
The httpunit developer team
(Russell, Wolfgang, Mark, Patrick and Tim as of 2008-04)
Logged In: YES
user_id=1220573
Originator: NO
Luca,
this is a very interesting bug report.
You'll find comments on in in the subversion trunk version 885.
I've not added your changes yet.
Yours
Wolfgang
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
Logged In: YES
user_id=37920
Originator: NO
re-opening, as I think this one make sense.