Skip to content

net/http: make it possible to access http.Server via http.ResponseWriter #12438

@bradfitz

Description

@bradfitz

If a handler wants to log an error, the ideal destination would be wherever its Server.ErrorLog points to.

But we can't get to the Server from a handler. Perhaps we can do an optional interface via the ResponseWriter.

Maybe this needs to be tied into various Context efforts.

Related: my comments on https://go-review.googlesource.com/#/c/14161/2/src/net/http/fs.go

/cc @Sajmani @adg @dsymonds @okdave

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions