Skip to content

net/http: make interface for verbatim transmission of http responses #8986

Closed
@DanielMorsing

Description

@DanielMorsing
Right now there are a couple of issues when using net/http as a transparent proxy

- There's no way to write trailer headers.
- There's no way to provide a custom status text, E.g. "420 Enhance Your Calm"
- Content-Type header is added on every response.

Being able to give the ResponseWriter a *Response gets around all of these problems.
Something like 

type Responder interface {
    Respond(*Response) error
}

in net/http would make it possible to use the server as a transparent proxy.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions