Re: RFR: 8351339: WebSocket::sendBinary assume that user supplied buffers are BIG_ENDIAN [v2]

2025-03-13 Thread Robert Engels
No. It is a simple bug. The payload is defined to be a byte stream. It should never be manipulated. The implementation MUST send the bytes exactly as the api caller provided. But I think there is something else at play - the implementation should not be reading the bytes at all - which is the

Re: RFR: 8351339: WebSocket::sendBinary assume that user supplied buffers are BIG_ENDIAN [v2]

2025-03-13 Thread Bernd
The implementation has to read them because websockets use an odd xor masking, and the implementation has optimized this with longs, which have this endian problem, (yes it’s a bug). Maybe some vector api can replace the handmade procedure in the future without caring for the declared endianess.Gru

Re: RFR: 8351339: WebSocket::sendBinary assume that user supplied buffers are BIG_ENDIAN [v2]

2025-03-13 Thread Robert Engels
Yes. More garbage engineering. The effective chance of this is 0 so setting mask to 1 isn’t really doing anything. Sometimes I’m really embarrassed by my colleagues - the fact that this made it into the spec is just insane. > On Mar 13, 2025, at 10:24 PM, Bernd wrote: > >  > The implementati

Re: RFR: 8351339: WebSocket::sendBinary assume that user supplied buffers are BIG_ENDIAN [v2]

2025-03-13 Thread Volkan Yazici
On Thu, 13 Mar 2025 13:42:40 GMT, Volkan Yazici wrote: >> Fixes endian handling `jdk.internal.net.http.websocket.Frame.Masker`. >> >> ### Implementation notes >> >> I deleted the `Frame` clone in tests, and rewired the test code depending on >> it to the actual `Frame`. To enable this, I relax

Re: RFR: 8351339: WebSocket::sendBinary assume that user supplied buffers are BIG_ENDIAN [v2]

2025-03-13 Thread Volkan Yazici
> Fixes endian handling `jdk.internal.net.http.websocket.Frame.Masker`. > > ### Implementation notes > > I deleted the `Frame` clone in tests, and rewired the test code depending on > it to the actual `Frame`. To enable this, I relaxed the visibility of the > actual `Frame`. I guess the `Frame`

Re: RFR: 8351339: WebSocket::sendBinary assume that user supplied buffers are BIG_ENDIAN [v2]

2025-03-13 Thread Mark Sheppard
On Thu, 13 Mar 2025 18:10:53 GMT, Daniel Fuchs wrote: >> Volkan Yazici has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix copyright years > > src/java.net.http/share/classes/jdk/internal/net/http/websocket/Frame.java > line 105: > >>

Re: RFR: 8351339: WebSocket::sendBinary assume that user supplied buffers are BIG_ENDIAN [v2]

2025-03-13 Thread Daniel Fuchs
On Thu, 13 Mar 2025 13:42:40 GMT, Volkan Yazici wrote: >> Fixes endian handling `jdk.internal.net.http.websocket.Frame.Masker`. >> >> ### Implementation notes >> >> I deleted the `Frame` clone in tests, and rewired the test code depending on >> it to the actual `Frame`. To enable this, I relax

Re: RFR: 8351419: java.net.http: Cleanup links in HttpResponse and module-info API doc comments [v2]

2025-03-13 Thread Michael McMahon
On Fri, 7 Mar 2025 17:54:29 GMT, Daniel Fuchs wrote: >> This is a trivial doc cleanup. HttpResponse and module-info have a few links >> that should use {@linkplain } instead of {@link } or . Also I noticed >> one link target mismatch, and some clarification missing in the send/receive >> buffe

Re: RFR: 8351339: WebSocket::sendBinary assume that user supplied buffers are BIG_ENDIAN [v2]

2025-03-13 Thread Mark Sheppard
On Thu, 13 Mar 2025 13:42:40 GMT, Volkan Yazici wrote: >> Fixes endian handling `jdk.internal.net.http.websocket.Frame.Masker`. >> >> ### Implementation notes >> >> I deleted the `Frame` clone in tests, and rewired the test code depending on >> it to the actual `Frame`. To enable this, I relax

Re: RFR: 8351897: Extra closing curly brace typos in Javadoc

2025-03-13 Thread Daniel Fuchs
On Thu, 13 Mar 2025 01:21:54 GMT, Archie Cobbs wrote: > This PR fixes minor Javadoc typos in a few `java.base` classes. Extra curly > braces have been sneaking in. LGTM - PR Review: https://git.openjdk.org/jdk/pull/24022#pullrequestreview-2681298904