Re: Does Network Error Logging API support WebSocket URLs?

874 views
Skip to first unread message

Adam Rice

unread,
Dec 4, 2023, 8:37:33 AM12/4/23
to Michael Hagar, blink-network-dev, net-dev
CC:ing net...@chromium.org, which has a larger audience.

It looks like it should work, but it's not tested in the source code. The spec does not consider "wss" to be equivalent to "https", so the NEL header has to be sent over a WebSocket connection to be recorded. However, the Fetch Standard does consider "wss" and "https" equivalent. I'm not sure which should "win" in this case, but our implementation treats "wss" and "https" as different.

I filed an issue at https://github.com/w3c/network-error-logging/issues/172 to try to get clarity on the spec question.

On Thu, 30 Nov 2023 at 04:11, 'Michael Hagar' via blink-network-dev <blink-ne...@chromium.org> wrote:
Our team is trying to implement Network Error Logging, but only seeing that it sends reports for HTTP URLs. Does it not support WebSocket URLs?

--
You received this message because you are subscribed to the Google Groups "blink-network-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-network-...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-network-dev/d75d56a8-f111-4e16-b98f-b394d774878bn%40chromium.org.

Ian Clelland

unread,
Dec 21, 2023, 11:50:42 AM12/21/23
to Adam Rice, Michael Hagar, blink-network-dev, net-dev
On Mon, Dec 4, 2023 at 8:37 AM Adam Rice <ri...@chromium.org> wrote:
CC:ing net...@chromium.org, which has a larger audience.

It looks like it should work, but it's not tested in the source code. The spec does not consider "wss" to be equivalent to "https", so the NEL header has to be sent over a WebSocket connection to be recorded. However, the Fetch Standard does consider "wss" and "https" equivalent. I'm not sure which should "win" in this case, but our implementation treats "wss" and "https" as different.

The fetch spec doesn't include "wss" at all; I'm not sure what you mean by equivalent here. As far as I understand, the scheme is always part of the origin, and so wss://example.com and https://example.com should be treated as different origins, and would each require their own NEL policy.


I filed an issue at https://github.com/w3c/network-error-logging/issues/172 to try to get clarity on the spec question.

On Thu, 30 Nov 2023 at 04:11, 'Michael Hagar' via blink-network-dev <blink-ne...@chromium.org> wrote:
Our team is trying to implement Network Error Logging, but only seeing that it sends reports for HTTP URLs. Does it not support WebSocket URLs?

--
You received this message because you are subscribed to the Google Groups "blink-network-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-network-...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-network-dev/d75d56a8-f111-4e16-b98f-b394d774878bn%40chromium.org.

--
You received this message because you are subscribed to the Google Groups "net-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to net-dev+u...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/net-dev/CAC_ixdwidmcks4owo%2B6ev9rox4q%2B6RZwcChPzdc5S3WVW0bWAA%40mail.gmail.com.

Adam Rice

unread,
Jan 17, 2024, 10:20:56 AMJan 17
to Ian Clelland, Michael Hagar, blink-network-dev, net-dev
The fetch spec doesn't include "wss" at all; I'm not sure what you mean by equivalent here. As far as I understand, the scheme is always part of the origin, and so wss://example.com and https://example.com should be treated as different origins, and would each require their own NEL policy.

Sorry, I forgot that the relevant text had moved to the WebSocket spec. See https://websockets.spec.whatwg.org/#concept-websocket-establish
Reply all
Reply to author
Forward
0 new messages