Skip to content

native fetch api does not respect keepalive parameter in RequestInit #2169

Description

@TheMythologist

Version

18.16.0

Platform

Microsoft Windows NT 10.0.19044.0 x64

Subsystem

No response

What steps will reproduce the bug?

fetch("http://localhost", { keepalive: false })

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior? Why is that the expected behavior?

Do not send the HTTP connection: keep-alive header. Instead, send a connection: close header.

What do you see instead?

The connection: keep-alive header will still be sent in the HTTP request.
image

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsChanges related to the documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions