mirror of
https://github.com/whyvl/wireproxy.git
synced 2025-07-11 22:41:53 +02:00
Pacify linter.
This commit is contained in:
parent
da52840a27
commit
e402177028
1 changed files with 3 additions and 3 deletions
6
http.go
6
http.go
|
@ -30,7 +30,7 @@ func (s *HTTPServer) authenticate(req *http.Request) (int, error) {
|
||||||
|
|
||||||
auth := req.Header.Get(proxyAuthHeaderKey)
|
auth := req.Header.Get(proxyAuthHeaderKey)
|
||||||
if auth == "" {
|
if auth == "" {
|
||||||
return http.StatusProxyAuthRequired, fmt.Errorf(http.StatusText(http.StatusProxyAuthRequired))
|
return http.StatusProxyAuthRequired, fmt.Errorf("%s", http.StatusText(http.StatusProxyAuthRequired))
|
||||||
}
|
}
|
||||||
|
|
||||||
enc := strings.TrimPrefix(auth, "Basic ")
|
enc := strings.TrimPrefix(auth, "Basic ")
|
||||||
|
@ -134,14 +134,14 @@ func (s *HTTPServer) serve(conn net.Conn) {
|
||||||
defer conn.Close()
|
defer conn.Close()
|
||||||
defer peer.Close()
|
defer peer.Close()
|
||||||
|
|
||||||
io.Copy(conn, peer)
|
_, _ = io.Copy(conn, peer)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
defer conn.Close()
|
defer conn.Close()
|
||||||
defer peer.Close()
|
defer peer.Close()
|
||||||
|
|
||||||
io.Copy(peer, conn)
|
_, _ = io.Copy(peer, conn)
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue