You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This proposal builds on #7907 (remove deprecated stuff) and #19660 (refactor ioutil to provide a coherent abstraction).
httputil currently contains:
Dump{Request,RequestOut,Response}: "It should only be used by servers to debug client requests." These would be clearer in a net/http/debug subpackage.
NewChunked{Reader,Writer}: "not needed by normal applications. The http package automatically decodes chunking when reading response bodies." Not obvious why it's exported, but it could easily go in a net/http/chunked subpackage.
ReverseProxy: Could easily go in a separate net/http/proxy subpackage.
BufferPool: has ~nothing to do with HTTP, and if it is still useful implies a garbage-collector issue that we should address instead.
ClientConn: "We should have deleted it before Go 1."
ServerConn: "We should have deleted it before Go 1."
I think the concrete suggestions here are mostly orthogonal to net/http proper.
It is clearly related, though: if the corresponding interfaces change, then that certainly impacts the utilities that hook into and/or implement those interfaces.
ianlancetaylor
changed the title
proposal: net/http/httputil: split into focused subpackages (Go 2)
proposal: net/http/httputil/v2: split into focused subpackages
Aug 6, 2024
This proposal builds on #7907 (remove deprecated stuff) and #19660 (refactor
ioutil
to provide a coherent abstraction).httputil
currently contains:Dump{Request,RequestOut,Response}
: "It should only be used by servers to debug client requests." These would be clearer in anet/http/debug
subpackage.NewChunked{Reader,Writer}
: "not needed by normal applications. The http package automatically decodes chunking when reading response bodies." Not obvious why it's exported, but it could easily go in anet/http/chunked
subpackage.ReverseProxy
: Could easily go in a separatenet/http/proxy
subpackage.BufferPool
: has ~nothing to do with HTTP, and if it is still useful implies a garbage-collector issue that we should address instead.ClientConn
: "We should have deleted it before Go 1."ServerConn
: "We should have deleted it before Go 1."(@bradfitz)
The text was updated successfully, but these errors were encountered: