Re: RFR 8245245 : WebSocket can loose the URL encoding of URI query parameters

2020-06-29 Thread Chris Hegarty
> On 26 Jun 2020, at 18:18, Daniel Fuchs wrote: > > I concur. Rahul has convinced me. > Rahul also pointed me to a test that verifies that the IAE is > thrown, so I believe that > http://cr.openjdk.java.net/~ryadav/webrev_8245245/index.html LGTM. -Chris.

Re: RFR 8245245 : WebSocket can loose the URL encoding of URI query parameters

2020-06-26 Thread Pavel Rappo
Looks good to me. P.S. I think I began to forget the very code I wrote. > On 26 Jun 2020, at 18:18, Daniel Fuchs wrote: > > I concur. Rahul has convinced me. > Rahul also pointed me to a test that verifies that the IAE is > thrown, so I believe that > http://cr.openjdk.java.net/~ryadav/webrev_8

Re: RFR 8245245 : WebSocket can loose the URL encoding of URI query parameters

2020-06-26 Thread Pavel Rappo
Chris, Currently (i.e. before the proposed change has been applied) the fragment is NOT retained. This is because of the requirement of the mentioned RFC section. The proposed change seems to overlook that detail. Hence, my question. -Pavel > On 26 Jun 2020, at 14:51, Chris Hegarty wrote: >

Re: RFR 8245245 : WebSocket can loose the URL encoding of URI query parameters

2020-06-26 Thread Daniel Fuchs
I concur. Rahul has convinced me. Rahul also pointed me to a test that verifies that the IAE is thrown, so I believe that http://cr.openjdk.java.net/~ryadav/webrev_8245245/index.html is good. best regards, -- daniel On 26/06/2020 16:42, Rahul Yadav wrote: Pavel, That scenario is already handl

Re: RFR 8245245 : WebSocket can loose the URL encoding of URI query parameters

2020-06-26 Thread Chris Hegarty
> On 26 Jun 2020, at 14:38, Pavel Rappo wrote: > > Rahul, > > Won't that start retaining the URL fragment? From > https://tools.ietf.org/html/rfc6455#section-3 > > Fragment identifiers are meaningless in the context of WebSocket URIs > and MUST NOT be used on these URIs. As with any UR

Re: RFR 8245245 : WebSocket can loose the URL encoding of URI query parameters

2020-06-26 Thread Rahul Yadav
Pavel, That scenario is already handled, the existing behavior is if there is a fragment, an exception is thrown. That hasn't changed. 344 private static URI checkURI(URI uri) { 345 String scheme = uri.getScheme(); 346 if (!("ws".equalsIgnoreCase(scheme) || "wss".equals

Re: RFR 8245245 : WebSocket can loose the URL encoding of URI query parameters

2020-06-26 Thread Chris Hegarty
> On 26 Jun 2020, at 15:10, Pavel Rappo wrote: > > Chris, > > Currently (i.e. before the proposed change has been applied) the fragment is > NOT retained. This is because of the requirement of the mentioned RFC > section. The proposed change seems to overlook that detail. Hence, my > quest

Re: RFR 8245245 : WebSocket can loose the URL encoding of URI query parameters

2020-06-26 Thread Pavel Rappo
Rahul, Won't that start retaining the URL fragment? From https://tools.ietf.org/html/rfc6455#section-3 Fragment identifiers are meaningless in the context of WebSocket URIs and MUST NOT be used on these URIs. As with any URI scheme, the character "#", when not indicating the start of a

RFR 8245245 : WebSocket can loose the URL encoding of URI query parameters

2020-06-26 Thread Rahul Yadav
Hello, Request to have my fix reviewed for issue: JDK-8245245  :  WebSocket can loose the URL encoding of URI query parameters The fix updates the jdk.internal.net.http.websocket.OpeningHandshake to ensure that the URL is not reencoded/decoded and loose the original encoding Issue:  https://bu

RFR 8245245 : WebSocket can loose the URL encoding of URI query parameters

2020-06-26 Thread Rahul Yadav
Hello, Request to have my fix reviewed for issue: JDK-8247675 :  WebSocket can loose the URL encoding of URI query parameters The fix updates the jdk.internal.net.http.websocket.OpeningHandshake to ensure that the URL is not reencoded/decoded and loose the original encoding Issue:  https://bug