Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
net/http, x/net/http2: update RFC numbers used as normative references #21974
The documentation in x/net/http and x/net/http2 packages still contains the obsolete RFC 2616 as a normative reference. I think it's better to replace the reference to RFC 2616 with a series of RFCs 7230 through 7235 for avoiding unnecessary confusion.
When we see some inconsistency, for example, RFC 2616 vs. RFC 723x, in the current implementation, that should be addressed as another issue. So this should be a documentation issue.
Is there a convention for referring to RFCs?
I see a mix of mostly just mentions of section numbers in the comments and sometimes URLs to specific section numbers of RFC 2616 (exclusively via www.w3.org).
In my opinion the URL makes sense if it is shown by godoc which seems to be the case in
Here are the inconsistencies with RFC-7230 i have found in net/http so far:
The handling of "hop-by-hop" Headers is defined differently:
However the current behavior has to be kept to maintain compatibility.
Other than that RFC 7230 defines more forbidden trailer headers for chunked transfers (see section 4.1.2) than currently implemented.
Note that i only looked in the places where rfc 2616 was referenced explicitly , so its hard to tell if there are other non obvious inconsistencies.
Thanks for tackling this issue.
Please open a new issue for shooting such inconsistencies, for getting more eyeballs. I think that leaving TODOs and issues is fine for now because the transition from H1 to H2 is a bit complicated work and probably takes a bit long time.
Replace references to the obsoleted RFC 2616 with references to RFC 7230 through 7235, to avoid unnecessary confusion. Updates golang/go#21974 Change-Id: Idbe3e73199f0bef9dbdbe1b75c39382799cd646c Reviewed-on: https://go-review.googlesource.com/94555 Reviewed-by: Brad Fitzpatrick <firstname.lastname@example.org> Run-TryBot: Brad Fitzpatrick <email@example.com> TryBot-Result: Gobot Gobot <firstname.lastname@example.org>
I have created an issue for the incorrect handling of Trailer headers : #23908
The handling of relative Location URIs in Redirect responses seem to be okay, but could use some addittional tests to ensure that fragments ar not thrown away. However im not sure if
Replace references to the obsoleted RFC 2616 with references to RFC 7230 through 7235, to avoid unnecessary confusion. Obvious inconsistencies are marked with todo comments. Updates #21974 Change-Id: I8fb4fcdd1333fc5193b93a2f09598f18c45e7a00 Reviewed-on: https://go-review.googlesource.com/94095 Reviewed-by: Brad Fitzpatrick <email@example.com>