Request for comments: Bug 6306820
Richard Kennard
richard at kennardconsulting.com
Fri Jun 29 23:22:05 PDT 2007
Michael,
Please find a new version of UrlEncodedQueryString at:
https://jdk-collaboration.dev.java.net/servlets/ProjectForumMessageView?messageID=20545&forumID=1463
Changes include:
1. JavaDoc changes
2. Changed String[] to List<String>
3. Uppercased enums
Basically, everything you asked for EXCEPT the thing about parse()
returning 'undefined'.
The problem here is I do not know if I can reliably error if I get an
invalid query string, as most strings would be considered valid query
strings and would probably parse to some degree. For example, if you
passed an entire URL string (the most likely error to make, I'd say):
http://java.sun.com?forum=3
I imagine this could validly be interpreted as a parameter called
'http://java.sun.com?forum' with a value of 3. Perhaps I should just say
the results are 'unpredictable'?
Richard.
More information about the net-dev
mailing list