fix 301 response missing Location header
error
This commit is contained in:
parent
15855ca0f2
commit
4fa5d04fb4
@ -85,6 +85,10 @@ func (c *Caller) GetLoginInfo(body []byte) (*LoginInfo, error) {
|
||||
|
||||
resp := NewReturnResponse(c.Client.GetLoginInfo(path.String()))
|
||||
if resp.Err() != nil {
|
||||
uErr, ok := resp.Err().(*url.Error)
|
||||
if ok && (uErr.Err.Error() == missLocationHeader.Error()) {
|
||||
return nil, loginForbiddenError
|
||||
}
|
||||
return nil, resp.Err()
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
Loading…
x
Reference in New Issue
Block a user