Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/net/http/httpguts: add parser/accessors for Link header #31609

Open
urandom2 opened this issue Apr 22, 2019 · 6 comments
Open

x/net/http/httpguts: add parser/accessors for Link header #31609

urandom2 opened this issue Apr 22, 2019 · 6 comments
Labels
FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@urandom2
Copy link
Contributor

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

$ go version
go version go1.12.4 linux/amd64

Does this issue reproduce with the latest release?

yes

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/user/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/user/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build550614768=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I am consuming an API that implements pagination via the link header, see RFC5988.

What did you expect to see?

I hoped that the std lib would have implemented a parser for this bespoke syntax. This could even be done lazily to prevent overhead.

What did you see instead?

I was forced to grab a 3rd party library (e.g. github.com/deiu/linkheader, github.com/tomnomnom/linkheader), or implement the parser myself.

@julieqiu
Copy link
Member

/cc @bradfitz

@bradfitz
Copy link
Contributor

net/http doesn't aim to be everything to everybody. It's perfectly acceptable to use third-party packages. If somebody wants to add something to x/net/http/httpguts, that's fine too.

@bradfitz bradfitz added this to the Unplanned milestone Apr 22, 2019
@bradfitz bradfitz changed the title net/http: pre-process link header x/net/http/httpguts: add parser/accessors for Link header Apr 22, 2019
@urandom2
Copy link
Contributor Author

sgtm; is there opposition to merging in something that has stabilized in golang.org/x/net, considering this is an RFC, or is the API bloat not worth the cost?

@bradfitz
Copy link
Contributor

I don't think it ever needs to live in net/http.

@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. label May 28, 2019
@smasher164
Copy link
Member

Is there still demand for this feature? I see NeedsFix on this issue, but there isn't a proposed API.

@bradfitz bradfitz added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 9, 2020
@gopherbot gopherbot removed the NeedsFix The path to resolution is known, but the work has not been done. label Jan 9, 2020
@bradfitz
Copy link
Contributor

bradfitz commented Jan 9, 2020

Changed it to NeedsInvestigation then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

6 participants