Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #28405
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Stanimir Stamenkov <s7an10@netscape.net> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: [LONG] java.net.URI encoding weirdness |
| Date | Tue, 06 May 2014 23:04:33 +0300 |
| Organization | A noiseless patient Spider |
| Lines | 39 |
| Message-ID | <lkbf8g$hm4$1@dont-email.me> (permalink) |
| References | <lk82m6$hhi$1@dont-email.me> <lk8n0o$ibf$1@dont-email.me> <lk8u3d$agp$1@dont-email.me> <lk9861$dk5$1@dont-email.me> <lka2s0$kma$1@dont-email.me> <lkb5rt$83i$1@dont-email.me> <lkbctv$dg$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Tue, 6 May 2014 20:04:32 +0000 (UTC) |
| Injection-Info | mx05.eternal-september.org; posting-host="daaaf033c96883e83e80378381c6380d"; logging-data="18116"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/tgYyBwG3N+Bybg/GHYYRv" |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26 |
| In-Reply-To | <lkbctv$dg$1@dont-email.me> |
| X-Face | "@)%Vlap6d%OVYDS}B4YUWE@yUy+^!w/+.q.,c5kjI#+uG?kYP&r/pTjNWgo:g[A,O=AL3/ j&4Le2cau$<e=FPq~GbeZ6DW1Grey[VHn8?ktzvoQtzlg;]&rh8g]CD+_BC7d[gW{Yx&_X*4Q$h&nJ l@t(|4R4:T='&]U#ui+z9OC$.~gJjU93kh:Ojc$Cz0n#I9!~!9ay?E<UlW&5,IFX1*KtA>MYEFst$y y"m]M7tq\S(>[a$x0x8%S |
| Cancel-Lock | sha1:2JWI/E7/DkXE7saKUSKpFCJnQyQ= |
| Xref | csiph.com comp.lang.java.programmer:28405 |
Show key headers only | View raw
Tue, 06 May 2014 12:24:44 -0700, /markspace/: > URI v = new URI(u.getScheme(), > u.getUserInfo(), > "server2", > u.getPort(), > u.getPath(), > u.getQuery(), > u.getFragment()); > [...] > To fix this, Oracle should at minimum deprecate this ctor. It's > plainly broken. Not just this one, but all except URI(String) are broken (that's what I've demonstrated in my OP). As they are not working correctly with almost every data which needs to be percent encoded, I think they should just accept encoded data and not perform additional encoding, apart from encoding the separator characters which distinguish them from the other components. Again, here's the relevant "When to Encode or Decode" section from the "URI: Generic Syntax" specification: http://tools.ietf.org/html/rfc3986#section-2.4 The URI class may continue to provide decoded component values for the cases one doesn't need to parse further into them, but then the safest way would be for the constructors to accept encoded values. All of: schemeSpecificPart authority path query should not be decoded before being actually dereferenced. -- Stanimir
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[LONG] java.net.URI encoding weirdness Stanimir Stamenkov <s7an10@netscape.net> - 2014-05-05 16:11 +0300
Re: [LONG] java.net.URI encoding weirdness Mike Amling <mamling@chaff.us> - 2014-05-05 11:37 -0500
Re: [LONG] java.net.URI encoding weirdness Mike Amling <mamling@chaff.us> - 2014-05-05 11:43 -0500
Re: [LONG] java.net.URI encoding weirdness Stanimir Stamenkov <s7an10@netscape.net> - 2014-05-05 19:50 +0300
Re: [LONG] java.net.URI encoding weirdness markspace <markspace@nospam.nospam> - 2014-05-05 11:58 -0700
Re: [LONG] java.net.URI encoding weirdness Stanimir Stamenkov <s7an10@netscape.net> - 2014-05-05 23:59 +0300
Re: [LONG] java.net.URI encoding weirdness markspace <markspace@nospam.nospam> - 2014-05-05 16:51 -0700
Re: [LONG] java.net.URI encoding weirdness Stanimir Stamenkov <s7an10@netscape.net> - 2014-05-06 10:26 +0300
Re: [LONG] java.net.URI encoding weirdness Steven Simpson <ss@domain.invalid> - 2014-05-06 08:47 +0100
Re: [LONG] java.net.URI encoding weirdness Stanimir Stamenkov <s7an10@netscape.net> - 2014-05-06 11:02 +0300
Re: [LONG] java.net.URI encoding weirdness markspace <markspace@nospam.nospam> - 2014-05-06 10:24 -0700
Re: [LONG] java.net.URI encoding weirdness Stanimir Stamenkov <s7an10@netscape.net> - 2014-05-06 22:24 +0300
Re: [LONG] java.net.URI encoding weirdness markspace <markspace@nospam.nospam> - 2014-05-06 12:24 -0700
Re: [LONG] java.net.URI encoding weirdness Stanimir Stamenkov <s7an10@netscape.net> - 2014-05-06 22:34 +0300
Re: [LONG] java.net.URI encoding weirdness markspace <markspace@nospam.nospam> - 2014-05-06 13:04 -0700
Re: [LONG] java.net.URI encoding weirdness Stanimir Stamenkov <s7an10@netscape.net> - 2014-05-06 23:07 +0300
Re: [LONG] java.net.URI encoding weirdness Stanimir Stamenkov <s7an10@netscape.net> - 2014-05-06 23:04 +0300
Re: [LONG] java.net.URI encoding weirdness Steven Simpson <ss@domain.invalid> - 2014-05-06 20:29 +0100
Re: [LONG] java.net.URI encoding weirdness markspace <markspace@nospam.nospam> - 2014-05-06 13:01 -0700
csiph-web