JDK-6797318: Undeclared IAE thrown from HttpURLConnection.connect for some URLs

2014-07-17 Thread Andreas Rieber
Hi, i would like to contribute a patch for this old issue. The suggested fix in the issue looks right but instead of the IOE it would simply connect to localhost. The same wrong behaviour can be reproduced with ProxySelector.setDefault(null). I also checked other protocols and http, https and ft

Re: RFR JDK-8027308: HttpURLConnection should better handle URLs with literal IPv6 addresses

2014-06-09 Thread Andreas Rieber
Hi Pavel, it could be shorter and faster with this: int pos; if (host.charAt(0) != '[' || (pos = host.indexOf('%')) == -1) { // not an IPv6-literal or doesn't contain zone info return host; } return host.substring(0, pos) + "]"; A comment

Re: Proxied https connection reuse by sun.net.www.http.HttpClient can send CONNECT to the destination server

2014-04-15 Thread Andreas Rieber
hanks, -Chris On 24 Dec 2013, at 08:44, Andreas Rieber <mailto:rieberandr...@gmail.com>> wrote: Hi Steven, On 24.12.2013 00:41, Steven Lawrance wrote: Hi net-dev, I filed this on September 26 at bugs.sun.com <http://bugs.sun.com>, which assigned bug ID 9007104 to it, but tha

Re: Proxied https connection reuse by sun.net.www.http.HttpClient can send CONNECT to the destination server

2013-12-24 Thread Andreas Rieber
Hi Steven, On 24.12.2013 00:41, Steven Lawrance wrote: Hi net-dev, I filed this on September 26 at bugs.sun.com , which assigned bug ID 9007104 to it, but that bug still does not appear to be visible. I'm emailing in case if that system malfunctioned. I now see that Open

Re: RFR: 8014719: HttpClient/ProxyTest.java failing with IAE HttpURLPermission.parseURI (and spec changes to HttpURLPermission)

2013-10-02 Thread Andreas Rieber
Hi Michael, there are a few more lines commented out in HttpURLConnection.java //}, null, p -- replace line above, when limited doPriv ready I guess they should be activated as well (line 1192, 1376 and 2517). I was already waiting for that change. - Andreas On 02.10.

Re: RFR: 8024508 Fix doclint issues in com.sun.nio.sctp

2013-09-10 Thread Andreas Rieber
On 10.09.2013 11:36, Alan Bateman wrote: On 10/09/2013 10:27, Andreas Rieber wrote: Minor hint, the copyright header year update is missing. Andreas We're not strictly required to do that each time, it's a confusing point that comes up regularly (with the result that we are in

Re: RFR: 8024508 Fix doclint issues in com.sun.nio.sctp

2013-09-10 Thread Andreas Rieber
Minor hint, the copyright header year update is missing. Andreas On 10.09.2013 11:09, Chris Hegarty wrote: Trivial doclint issues in the com.sun.nio.sctp public package. diff -r 4fd7abaf0a5f src/share/classes/com/sun/nio/sctp/Association.java --- a/src/share/classes/com/sun/nio/sctp/Associatio

Re: Code Review Request: 8017779: java/net/Authenticator/B4769350.java fails

2013-07-26 Thread Andreas Rieber
Hi Kurchi, i looked into the change. Today i did run it a few time and it allays worked. The logic looks straight forward to me. I would only improve indenting and the try - autoclose for the Server. The startServer() can be implemented in the constructor. The server.close() in the exept() m

6560175: HttpURLConnection should support arbitrary methods

2013-07-02 Thread Andreas Rieber
Hi, i am looking for a sponsor. In the issue comment it says: "sounds feasible for jdk7" - but well, it didn't make it... Bug: http://bugs.sun.com/view_bug.do?bug_id=6560175 I checked the code and would like to update the comment and javadoc of the current setRequestMethod() - no code change th

new class HttpURLPermission

2013-07-01 Thread Andreas Rieber
Hi, i just had a look at the new HttpURLPermission and there might be an issue in normalizeMethods(). It throws only IllegalArgumentException for SP and HT, there are a few more illegal characters. Other than that the method is case-sensitiv. Also the used wild-card '*' is a valid method. No

Re: 6563286: HttpURLConnection.followRedirect(..) follows malformed url.

2013-06-27 Thread Andreas Rieber
er/6563286/webrev.02/ thanks Andreas On 26.06.13 21:50, Andreas Rieber wrote: Hi Kurchi, i removed the closed issue. Then i checked again the HttpURLConnection and moved the check so really only redirects are detected and handled properly with the IOException. The test i updated and moved to

Re: 6563286: HttpURLConnection.followRedirect(..) follows malformed url.

2013-06-26 Thread Andreas Rieber
Updated webrev: http://cr.openjdk.java.net/~arieber/6563286/webrev.01/ cheers Andreas PS: i also liked the autocloseable, was waiting to long for the builds and had to do something else in between ;-) On 25.06.13 22:18, Andreas Rieber wrote: Hi Kurchi, thanks for the first feedback. The problem i

Re: 6563286: HttpURLConnection.followRedirect(..) follows malformed url.

2013-06-25 Thread Andreas Rieber
nput on this. I can sponsor the change for you. We may need an internal approval here for the minor API change. Thanks, - Kurchi On 6/24/2013 12:42 PM, Andreas Rieber wrote: Hi, here a small fix for 2 older issues. First i wrote the test for wrong URL at connection time and at redirect time

6563286: HttpURLConnection.followRedirect(..) follows malformed url.

2013-06-24 Thread Andreas Rieber
Hi, here a small fix for 2 older issues. First i wrote the test for wrong URL at connection time and at redirect time. Bug(s): http://bugs.sun.com/view_bug.do?bug_id=6563286 http://bugs.sun.com/view_bug.do?bug_id=5069130 Webrev: http://cr.openjdk.java.net/~arieber/6563286/webrev.00/ What happe

Re: 7157360: HttpURLConnection: HTTP method DELETE doesn't support output

2013-06-21 Thread Andreas Rieber
include a body in a DELETE request, but seems harmless. I noticed that the javafx issue is no longer dependent on this, but still worth fixing. I can sponsor this change into jdk8 for you. -Chris. On 20/06/2013 23:04, Andreas Rieber wrote: Hi, here the next issue i would need a sponsor for

7157360: HttpURLConnection: HTTP method DELETE doesn't support output

2013-06-20 Thread Andreas Rieber
Hi, here the next issue i would need a sponsor for. Also a very small one. Bug: http://bugs.sun.com/view_bug.do?bug_id=7157360 Looked straight forward to me for the DELETE method, but from last issue i still have the HTTP/1.1 spec open. Here the relevant parts: >> 4.3 Message Body ... The pres

Re: 7025238 : HttpURLConnection does not handle URLs with an empty path component

2013-06-20 Thread Andreas Rieber
On 20.06.13 12:55, Chris Hegarty wrote: On 06/20/2013 10:33 AM, Andreas Rieber wrote: I see, short test without leading "/" in the path causes the httpserver to throws exception: Exception in thread "main" java.lang.IllegalArgumentException: Illegal value for path

Re: 7025238 : HttpURLConnection does not handle URLs with an empty path component

2013-06-20 Thread Andreas Rieber
for you. http://hg.openjdk.java.net/jdk8/tl/jdk/rev/2b156531b7eb For extra credits ;-) does it make sense to something similar on the server side, sun.net.httpserver??? -Chris. On 06/19/2013 07:29 PM, Andreas Rieber wrote: Hi Kurchi, to change the path in URL.java would not be a good idea, i

Re: 7025238 : HttpURLConnection does not handle URLs with an empty path component

2013-06-20 Thread Andreas Rieber
10:40, Chris Hegarty wrote: I see Kurchi pushed this change for you. http://hg.openjdk.java.net/jdk8/tl/jdk/rev/2b156531b7eb For extra credits ;-) does it make sense to something similar on the server side, sun.net.httpserver??? -Chris. On 06/19/2013 07:29 PM, Andreas Rieber wrote: Hi Kur

Re: 7025238 : HttpURLConnection does not handle URLs with an empty path component

2013-06-19 Thread Andreas Rieber
URL.path is logically used in http client is in ParseUtil.toURI(), which basically does the same thing as your fix. I'll run the fix against all networking tests on all platforms and let you know how things look. Thanks! Kurchi On 6/19/2013 7:14 AM, Andreas Rieber wrote: Hi Chris and K

Re: 7025238 : HttpURLConnection does not handle URLs with an empty path component

2013-06-19 Thread Andreas Rieber
Hi Chris and Kurchi, i have updated and rerun the test (removed the "@run main/othervm B7025238"). New webrev is here: http://cr.openjdk.java.net/~arieber/7025238/webrev.01/ thanks Andreas On 19.06.13 15:33, Chris Hegarty wrote: Hi Andreas, On 18/06/2013 20:19, Andreas Rieber

7025238 : HttpURLConnection does not handle URLs with an empty path component

2013-06-18 Thread Andreas Rieber
Hi, i am looking for a sponsor of this issue. The bug is here: http://bugs.sun.com/view_bug.do?bug_id=7025238 First i verified that the problem still exists. Then i checked the problem against some other web servers. Apache handles a missing "/" in the path. Tomcat, Microsoft-HTTPAPI/2.0 and