Skip to content

proposal: net/http/httputil/v2: split into focused subpackages #20758

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

Open
bcmills opened this issue Jun 22, 2017 · 4 comments
Open

proposal: net/http/httputil/v2: split into focused subpackages #20758

bcmills opened this issue Jun 22, 2017 · 4 comments
Labels
Proposal v2 An incompatible library change
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Jun 22, 2017

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."

(@bradfitz)

@gopherbot gopherbot added this to the Proposal milestone Jun 22, 2017
@bradfitz
Copy link
Contributor

Is it open season on filing bugs about everything that's wrong in the standard library?

@bcmills
Copy link
Contributor Author

bcmills commented Jun 22, 2017

Yep. :)

Just want to make sure we don't miss anything. (It's like grocery shopping: if I don't make a list I'll forget all the important stuff.)

@dsnet dsnet added the v2 An incompatible library change label Jun 22, 2017
@ianlancetaylor ianlancetaylor added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 20, 2018
@ianlancetaylor
Copy link
Contributor

Should this be handled as part of #5465?

@bcmills
Copy link
Contributor Author

bcmills commented May 8, 2018

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 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
@ianlancetaylor ianlancetaylor removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Proposal v2 An incompatible library change
Projects
None yet
Development

No branches or pull requests

5 participants