Closed davidfowl closed 7 years ago
I'm surprised you're not saying sorry about DetectContentType - that is way more concerning than Basic Auth, although at least they're not picking some of the more dangerous ones.
WriteProxy is for clients, not servers.
Not sure what you mean. If you look at their API it writes to a "Stream" equivalent. This might be any network stream that is proxying requests over to another server even. It doesn't need to map directly to HttpClient.
MVC already handles many of these, correct? Static files implements them, but that implementation wouldn't be generally applicable because it relies on SendFile.
Moving building blocks into HttpAbstractions would be great. Even simpler versions that didn't rely on MVC intrinsics would be a good start.
@davidfowl Moving out of V1. If you think this is a MUST, bring it back
I was looking at golang's standard library and they have a pretty beefy http package https://golang.org/pkg/net/http. Here are a few that seemed interesting:
https://golang.org/pkg/net/http/#Request.WriteProxy https://golang.org/pkg/net/http/#ServeContent https://golang.org/pkg/net/http/#Request.SetBasicAuth (sorry @blowdart :smile: ) https://golang.org/pkg/net/http/#DetectContentType https://golang.org/pkg/net/http/#MaxBytesReader