Skip to content

net/http: support status code 102 (Processing) in ResponseWriter #36734

Closed
@majewsky

Description

@majewsky

HTTP status code 102 (Processing) is defined by RFC 2518, section 10.1:

This status code SHOULD only be sent when the server has a reasonable expectation that the request will take significant time to complete. [...] The server MUST send a final response after the request has been completed.

As of now (Go 1.13.6), there is no way to actually send a 102 response because ResponseWriter.WriteHeader() can only be called once. Any successive calls are rejected (here).

Since the ResponseWriter interface cannot be extended without breaking backwards compatibility, a new interface should be added (and implemented by the existing ResponseWriter implementations) that exposes a function for sending an interim response with status 102.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions