{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/21814","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/21814/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/21814/comments","events_url":"https://api.github.com/repos/golang/go/issues/21814/events","html_url":"https://github.com/golang/go/issues/21814","id":256379063,"node_id":"MDU6SXNzdWUyNTYzNzkwNjM=","number":21814,"title":"net/http/httputil: ReverseProxy no longer uses io.ReaderFrom/WriterTo","user":{"login":"Zariel","id":2213,"node_id":"MDQ6VXNlcjIyMTM=","avatar_url":"https://avatars0.githubusercontent.com/u/2213?v=4","gravatar_id":"","url":"https://api.github.com/users/Zariel","html_url":"https://github.com/Zariel","followers_url":"https://api.github.com/users/Zariel/followers","following_url":"https://api.github.com/users/Zariel/following{/other_user}","gists_url":"https://api.github.com/users/Zariel/gists{/gist_id}","starred_url":"https://api.github.com/users/Zariel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zariel/subscriptions","organizations_url":"https://api.github.com/users/Zariel/orgs","repos_url":"https://api.github.com/users/Zariel/repos","events_url":"https://api.github.com/users/Zariel/events{/privacy}","received_events_url":"https://api.github.com/users/Zariel/received_events","type":"User","site_admin":false},"labels":[{"id":357033853,"node_id":"MDU6TGFiZWwzNTcwMzM4NTM=","url":"https://api.github.com/repos/golang/go/labels/WaitingForInfo","name":"WaitingForInfo","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2017-09-08T21:43:10Z","updated_at":"2018-08-26T01:36:25Z","closed_at":"2017-10-27T17:34:27Z","author_association":"NONE","body":"Before go 1.8 `httputil.ReverseProxy` would use `io.CopyBuffer` which would use `io.ReaderFrom` or `io.WriterTo` if possible to avoid allocation. In fixing #16659 it removed using `io.CopyBuffer` and implements its own without the optimisations of `io.CopyBuffer` to add an extra log.\r\n\r\nPlease answer these questions before submitting your issue. Thanks!\r\n\r\n#### What did you do?\r\nhttps://play.golang.org/p/4GjT-hwI3t\r\n\r\n#### What did you expect to see?\r\nWriteTo\r\n\r\n#### What did you see instead?\r\nRead\r\n\r\n#### System details\r\n\r\n```\r\ngo version go1.9 darwin/amd64\r\nGOARCH=\"amd64\"\r\nGOBIN=\"\"\r\nGOEXE=\"\"\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"darwin\"\r\nGOOS=\"darwin\"\r\nGOPATH=\"/Users/chris/dev/go\"\r\nGORACE=\"\"\r\nGOROOT=\"/usr/local/opt/go/libexec\"\r\nGOTOOLDIR=\"/usr/local/opt/go/libexec/pkg/tool/darwin_amd64\"\r\nGCCGO=\"gccgo\"\r\nCC=\"clang\"\r\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -gno-record-gcc-switches -fno-common\"\r\nCXX=\"clang++\"\r\nCGO_ENABLED=\"1\"\r\nCGO_CFLAGS=\"-g -O2\"\r\nCGO_CPPFLAGS=\"\"\r\nCGO_CXXFLAGS=\"-g -O2\"\r\nCGO_FFLAGS=\"-g -O2\"\r\nCGO_LDFLAGS=\"-g -O2\"\r\nPKG_CONFIG=\"pkg-config\"\r\nGOROOT/bin/go version: go version go1.9 darwin/amd64\r\nGOROOT/bin/go tool compile -V: compile version go1.9\r\nuname -v: Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64\r\nProductName:\tMac OS X\r\nProductVersion:\t10.11.3\r\nBuildVersion:\t15D21\r\nlldb --version: lldb-340.4.110.1\r\ngdb --version: GNU gdb (GDB) 8.0\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/416007627","html_url":"https://github.com/golang/go/issues/21814#issuecomment-416007627","issue_url":"https://api.github.com/repos/golang/go/issues/21814","id":416007627,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjAwNzYyNw==","user":{"login":"fastest963","id":112555,"node_id":"MDQ6VXNlcjExMjU1NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/112555?v=4","gravatar_id":"","url":"https://api.github.com/users/fastest963","html_url":"https://github.com/fastest963","followers_url":"https://api.github.com/users/fastest963/followers","following_url":"https://api.github.com/users/fastest963/following{/other_user}","gists_url":"https://api.github.com/users/fastest963/gists{/gist_id}","starred_url":"https://api.github.com/users/fastest963/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastest963/subscriptions","organizations_url":"https://api.github.com/users/fastest963/orgs","repos_url":"https://api.github.com/users/fastest963/repos","events_url":"https://api.github.com/users/fastest963/events{/privacy}","received_events_url":"https://api.github.com/users/fastest963/received_events","type":"User","site_admin":false},"created_at":"2018-08-26T01:36:25Z","updated_at":"2018-08-26T01:36:25Z","author_association":"CONTRIBUTOR","body":"@fraenkel thanks for the benchmarks those definitely are useful for context. What do you mean by:\r\n> The error returned from the io.CopyBuffer() is \"unexpected EOF\" as a string.\r\n\r\nIt has to be an error type, right? Can you print out the type? Is it a *net.OpError?\r\n\r\nWhen you say:\r\n> Just so you are aware, on any short read, you will get no logged error.\r\n\r\nWhat was the change you made? Did you take the error and call getErrorHandler if there was an error from `copyResponse`?\r\n"}}
{"actor":{"display_login":"fastest963"}}