hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject [httpclient] URLEncodedUtils parser delimiters
Date Wed, 05 Jun 2013 16:48:56 GMT
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?

FWIW, I tested with this

    private static final char[] DELIM = new char[] { '&', ';' };
    private static final String DELIM_PATTERN = "[" + new String(DELIM) +
"]";

Gary

-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message