Skip to content

net/http: update docs for LocalAddrContextKey #21603

Closed
@sabey

Description

@sabey

What version of Go are you using (go version)?

1.9

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

amd64

What did you do?

r is a *http.Request
r.Context().Value(http.LocalAddrContextKey)

What did you expect to see?

Listener Addr

What did you see instead?

Connection Local Addr

I replied to an older closed issue, I'm not sure if it will be seen or not so I am posting again: #18686
It seems that the functionality of LocalAddrContextKey has changed to what it was possibly intended to do, if so it should be mentioned in the patch notes

source change: https://go-review.googlesource.com/c/go/+/35490/10/src/net/http/server.go

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions