Re: [whatwg/fetch] Should Content-Type header be stripped when redirecting from POST to GET? (#609)

Sorry, missed the notification.

`Content-*` is a convention; there isn't a hard-and-fast rule that all content-specific headers need to start with it, or that all headers starting with it are about the content (although it would be weird if they weren't).

Safest thing to do for now would probably be to enumerate the applicable headers to remove; since we're talking about a request, I think that's `Content-Disposition`, `Content-Encoding`, `Content-Language`, `Content-Location`, `Content-Range`, `Content-Type`, `ETag`.

I'm assuming that things "below" fetch will be managed appropriately (e.g., `Connection`, CORS) for the new request.

That's not terribly satisfying. When the method is rewritten, I'd argue that the request is fundamentally new, and the application needs to decide whether the various headers it might have added are still applicable -- i.e., the redirect should NOT be automatic. But I recognise that allowing that causes other headaches.

You'll probably want to enumerate the headers as a list in Fetch, so you can add to it; e.g., the proposed `Integrity` header might be a candidate.


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

Received on Tuesday, 20 February 2018 21:58:50 UTC