Use io.CopyN to simplify THeaderTransport code
Use io.CopyN to simplify THeaderTransport code

Client: go

In THeaderTransport implementation, use io.CopyN instead of
io.Copy+io.LimitReader.

Underlying io.CopyN is actually implemented with io.Copy+io.LimitReader
[0], but it also does some extra checks we can take advantage of. It
also simplifies the code in thrift repo.

[0]: https://github.com/golang/go/blob/83b181c68bf332ac7948f145f33d128377a09c42/src/io/io.go#L340
yongju-hong/thrift,apache/thrift,dcelasun/thrift,nsuke/thrift,creker/thrift,dcelasun/thrift,apache/thrift,nsuke/thrift,strava/thrift,Jens-G/thrift,nsuke/thrift,Jens-G/thrift,strava/thrift,apache/thrift,Jens-G/thrift,nsuke/thrift,bforbis/thrift,Jens-G/thrift,apache/thrift,jeking3/thrift,jeking3/thrift,jeking3/thrift,strava/thrift,jeking3/thrift,creker/thrift,yongju-hong/thrift,strava/thrift,dcelasun/thrift,Jens-G/thrift,bforbis/thrift,strava/thrift,Jens-G/thrift,apache/thrift,Jens-G/thrift,jeking3/thrift,creker/thrift,nsuke/thrift,bforbis/thrift,bforbis/thrift,apache/thrift,bforbis/thrift,Jens-G/thrift,dcelasun/thrift,bforbis/thrift,bforbis/thrift,Jens-G/thrift,jeking3/thrift,Jens-G/thrift,yongju-hong/thrift,strava/thrift,bforbis/thrift,jeking3/thrift,nsuke/thrift,nsuke/thrift,apache/thrift,dcelasun/thrift,jeking3/thrift,nsuke/thrift,jeking3/thrift,bforbis/thrift,yongju-hong/thrift,Jens-G/thrift,strava/thrift,creker/thrift,apache/thrift,nsuke/thrift,nsuke/thrift,jeking3/thrift,dcelasun/thrift,apache/thrift,yongju-hong/thrift,nsuke/thrift,dcelasun/thrift,strava/thrift,dcelasun/thrift,dcelasun/thrift,apache/thrift,apache/thrift,nsuke/thrift,dcelasun/thrift,strava/thrift,creker/thrift,jeking3/thrift,yongju-hong/thrift,Jens-G/thrift,Jens-G/thrift,bforbis/thrift,jeking3/thrift,Jens-G/thrift,strava/thrift,dcelasun/thrift,Jens-G/thrift,yongju-hong/thrift,creker/thrift,yongju-hong/thrift,strava/thrift,jeking3/thrift,yongju-hong/thrift,bforbis/thrift,bforbis/thrift,yongju-hong/thrift,apache/thrift,apache/thrift,strava/thrift,dcelasun/thrift,apache/thrift,apache/thrift,jeking3/thrift,dcelasun/thrift,apache/thrift,yongju-hong/thrift,dcelasun/thrift,bforbis/thrift,bforbis/thrift,bforbis/thrift,nsuke/thrift,nsuke/thrift,creker/thrift,yongju-hong/thrift,creker/thrift,jeking3/thrift,jeking3/thrift,creker/thrift,dcelasun/thrift,bforbis/thrift,bforbis/thrift,nsuke/thrift,strava/thrift,yongju-hong/thrift,creker/thrift,creker/thrift,dcelasun/thrift,yongju-hong/thrift,apache/thrift,apache/thrift,nsuke/thrift,yongju-hong/thrift,creker/thrift,Jens-G/thrift,yongju-hong/thrift,Jens-G/thrift,dcelasun/thrift,strava/thrift,nsuke/thrift,strava/thrift,strava/thrift,creker/thrift,Jens-G/thrift,strava/thrift,creker/thrift,yongju-hong/thrift