Re: [whatwg/fetch] Unclear how to serialize request origin "client" (Issue #1773)

Right, its set during [fetching](https://fetch.spec.whatwg.org/#concept-fetch) and then never touched again:
> If request’s [origin](https://fetch.spec.whatwg.org/#concept-request-origin) is "client", then set request’s [origin](https://fetch.spec.whatwg.org/#concept-request-origin) to request’s [client](https://fetch.spec.whatwg.org/#concept-request-client)’s [origin](https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-origin).

Adding an assert seems reasonable. There are more places where its not immediately obvious that they are only called when the origin cannot be `"client"`, like [`append a request origin header`](https://fetch.spec.whatwg.org/#append-a-request-origin-header). I assume those should get an assert too?


-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1773#issuecomment-2368954140
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/issues/1773/2368954140@github.com>

Received on Monday, 23 September 2024 17:45:31 UTC