On Thu, 2013-06-06 at 09:47 -0400, Gary Gregory wrote: > On Thu, Jun 6, 2013 at 8:25 AM, Oleg Kalnichevski <ol...@apache.org> wrote: > > > On Wed, 2013-06-05 at 12:48 -0400, Gary Gregory wrote: > > > Hi All: > > > > > > It seems to me that URLEncodedUtils.DELIM should be: > > > > > > new char[] { '&', ';' }; > > > > > > instead of: > > > > > > new char[] { '&' }; > > > > > > All the tests pass with this change. It just seems like an omission. > > > > > > > > > Also in > > > org.apache.http.client.utils.URLEncodedUtils.parse(List<NameValuePair>, > > > Scanner, String) > > > > > > scanner.useDelimiter(PARAMETER_SEPARATOR); > > > > > > should be: > > > > > > scanner.useDelimiter("[&;]"); > > > > > > Am I missing something? > > > > > > > > > Gary > > > > Can you give an example (or better yet, a test case ;-)) of URL encoded > > content where semicolon is used as a delimiter? > > > > Hi Oleg, > > See notes 1, 2, and 3 in https://en.wikipedia.org/wiki/URI_scheme > > 1. *^ <https://en.wikipedia.org/wiki/URI_scheme#cite_ref-1>* RFC > 1866<https://tools.ietf.org/html/rfc1866>section 8.2.1 : by Tim > Berners-Lee in 1995 encourages CGI authors to > support ';' in addition to '&'. > 2. *^ <https://en.wikipedia.org/wiki/URI_scheme#cite_ref-2>* HTML 4.01 > Specification: Implementation, and Design > Notes<http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.2.2>: > "CGI implementors support the use of ";" in place of "&" to save authors > the trouble of escaping "&" characters in this manner." > 3. *^ <https://en.wikipedia.org/wiki/URI_scheme#cite_ref-3>* Hypertext > Markup Language - > 2.0<http://www.w3.org/MarkUp/html-spec/html-spec_foot.html#FOOT26>"CGI > implementors are encouraged to support the use of ';' in place of '&' > " > > I use URLEncodedUtils directly in my app to parse URL/URIs. > > I'll add unit tests if these changes are deemed acceptable. > > Gary > >
I had no idea. Of course, it sounds perfectly reasonable. We should probably consider changing the formatting routines as well. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org