mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
http: fixed a compatibility issue with some http proxy server. #62
This commit is contained in:
1 parent
70a88f4789
commit
15b98359b1
3 files changed
+6
-4
No files matched your search
@@ -242,8 +242,10 @@ func (s *HTTP) Dial(network, addr string) (net.Conn, error) {
|
||||
|
||||
respR := bufio.NewReader(rc)
|
||||
respTP := textproto.NewReader(respR)
|
||||
|
||||
_, code, _, ok := parseFirstLine(respTP)
|
||||
if ok && code == "200" {
|
||||
respTP.ReadMIMEHeader()
|
||||
return rc, err
|
||||
} else if code == "407" {
|
||||
log.F("[http] authencation needed by proxy %s", s.addr)
|
||||
|
||||
Reference in new issue
Block a user