Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Refused to set unsafe header "connection" #655

Closed
chris-herring opened this issue Feb 9, 2017 · 1 comment
Closed

Refused to set unsafe header "connection" #655

chris-herring opened this issue Feb 9, 2017 · 1 comment

Comments

@chris-herring
Copy link

I've noticed this error in Safari (9.1.2) and found in domain-task the following:

    if (!init.headers['Connection']) {
        init.headers['Connection'] = 'keep-alive';
    }

I see Connection listed here as a forbidden header name in the fetch spec.

Can this be wrapped in a !isBrowser condition?

@SteveSandersonMS
Copy link
Member

Thanks for reporting this. The Connection header was only needed to work around a bug in Kestrel on ASP.NET Core 1.0. Since we now depend on ASP.NET Core 1.1 where Kestrel no longer has that bug, the workaround is no longer needed.

So, I've published domain-task 2.0.3 which no longer contains this problematic logic.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants