Re: unable to encode reserved characters using java.net.URI multi-arg constructors

2008-01-22 Thread Tim Julien
Oleg Kalnichevski wrote: On Sat, 2008-01-19 at 09:33 -0800, Sam Berlin wrote: Here's my take. There is nothing wrong with j.u.URI as such. It just needs a better parser that can deal with escaped and unescaped queries, as well as be more lenient about common non-compliant behaviors, and then

Re: unable to encode reserved characters using java.net.URI multi-arg constructors

2008-01-21 Thread Sam Berlin
FWIW, replacing the else branch in DefaultClientRequestDirector.rewriteRequestURI with -- String path = uri.getRawPath(); String query = uri.getRawQuery(); String fragment = uri.getRawFragment(); String newUri = (path

Re: unable to encode reserved characters using java.net.URI multi-arg constructors

2008-01-20 Thread Roland Weber
Oleg Kalnichevski wrote: On Sat, 2008-01-19 at 09:33 -0800, Sam Berlin wrote: It almost certainly would work, however HttpClient would then be broken (as far as URI parsing goes) for everyone else. As others have pointed out (and as Tim explained to me in sad detail), URI is just basically

Re: unable to encode reserved characters using java.net.URI multi-arg constructors

2008-01-19 Thread Oleg Kalnichevski
On Fri, 2008-01-18 at 21:35 +0100, Ortwin Glück wrote: Oleg Kalnichevski wrote: needs a better parser that can deal with escaped and unescaped queries, Sorry, Oleg, nobody can deal with unescaped queries. It's NOT POSSIBLE (tm). Escape, maybe? ;-) Oleg

Re: unable to encode reserved characters using java.net.URI multi-arg constructors

2008-01-19 Thread Sam Berlin
Here's my take. There is nothing wrong with j.u.URI as such. It just needs a better parser that can deal with escaped and unescaped queries, as well as be more lenient about common non-compliant behaviors, and then construct the URI instance using a multi-arg constructor. It was long on my

Re: unable to encode reserved characters using java.net.URI multi-arg constructors

2008-01-18 Thread Ortwin Glück
Oleg Kalnichevski wrote: needs a better parser that can deal with escaped and unescaped queries, Sorry, Oleg, nobody can deal with unescaped queries. It's NOT POSSIBLE (tm). - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: unable to encode reserved characters using java.net.URI multi-arg constructors

2008-01-18 Thread Oleg Kalnichevski
On Fri, 2008-01-18 at 09:47 -0500, Tim Julien wrote: All, I've spent a few days looking into some strange URL encoding issues on http client 4.0 alpha 2. I'll describe some things I've found, hopefully I am thinking about this correctly. I think there is a regression from 3.0 - 4.0 due

Re: unable to encode reserved characters using java.net.URI multi-arg constructors

2008-01-18 Thread Ortwin Glück
Tim Julien wrote: For example, suppose I want to produce this URL: http://foo.com/bar?a=bc=jon%26doe // %26 is the encoded value of // %25 is the encoded value of % uri = new URI(http, null, foo.com, -1, /bar, a=bc=jon%26doe, null); uri.toASCIIString() -

unable to encode reserved characters using java.net.URI multi-arg constructors

2008-01-18 Thread Tim Julien
All, I've spent a few days looking into some strange URL encoding issues on http client 4.0 alpha 2. I'll describe some things I've found, hopefully I am thinking about this correctly. I think there is a regression from 3.0 - 4.0 due to the use of java.net.URI On the old commons http client