Merge remote-tracking branch 'upstream/master'

This commit is contained in:
vitalii 2018-10-21 12:52:46 +03:00
commit c8fc9ca590

View File

@ -38,6 +38,9 @@ func (c *Client) req(method, path string, body io.Reader, intercept func(*http.R
} }
rs, err := c.c.Do(r) rs, err := c.c.Do(r)
if err != nil {
return nil, err
}
if rs.StatusCode == 401 && c.auth.Type() == "NoAuth" { if rs.StatusCode == 401 && c.auth.Type() == "NoAuth" {
if strings.Index(rs.Header.Get("Www-Authenticate"), "Digest") > -1 { if strings.Index(rs.Header.Get("Www-Authenticate"), "Digest") > -1 {