[Pkg-privacy-commits] [obfs4proxy] 72/151: Fix minor style issues pointed out by golint.
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 12:59:40 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository obfs4proxy.
commit 697b51b4bd2d13781004675aa098039e26ba2395
Author: Yawning Angel <yawning at schwanenlied.me>
Date: Wed May 28 04:25:47 2014 +0000
Fix minor style issues pointed out by golint.
---
obfs4proxy/proxy_http.go | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/obfs4proxy/proxy_http.go b/obfs4proxy/proxy_http.go
index 0870e5d..c7b926a 100644
--- a/obfs4proxy/proxy_http.go
+++ b/obfs4proxy/proxy_http.go
@@ -76,14 +76,14 @@ func (s *httpProxy) Dial(network, addr string) (net.Conn, error) {
}
// HACK HACK HACK HACK. http.ReadRequest also does this.
- reqUrl, err := url.Parse("http://" + addr)
+ reqURL, err := url.Parse("http://" + addr)
if err != nil {
conn.httpConn.Close()
return nil, err
}
- reqUrl.Scheme = ""
+ reqURL.Scheme = ""
- req, err := http.NewRequest("CONNECT", reqUrl.String(), nil)
+ req, err := http.NewRequest("CONNECT", reqURL.String(), nil)
if err != nil {
conn.httpConn.Close()
return nil, err
@@ -120,9 +120,8 @@ func (c *httpConn) Read(b []byte) (int, error) {
if c.staleReader != nil {
if c.staleReader.Buffered() > 0 {
return c.staleReader.Read(b)
- } else {
- c.staleReader = nil
}
+ c.staleReader = nil
}
return c.hijackedConn.Read(b)
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/obfs4proxy.git
More information about the Pkg-privacy-commits
mailing list