Skip to content
Snippets Groups Projects
Commit 697b51b4 authored by Yawning Angel's avatar Yawning Angel
Browse files

Fix minor style issues pointed out by golint.

parent 9fe9959c
No related branches found
No related tags found
No related merge requests found
......@@ -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)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment