diff options
| author | Shulhan <ms@kilabit.info> | 2021-05-19 13:43:56 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-05-19 13:43:56 +0700 |
| commit | b88099190a7b809e9cd4052edfbe8396322a9cff (patch) | |
| tree | d60e420e710030f6f795bd9f5d10580b1bc144e2 | |
| parent | bd51133fbda340542ec29ec1035b028ea112e028 (diff) | |
| download | pakakeh.go-b88099190a7b809e9cd4052edfbe8396322a9cff.tar.xz | |
xmlrpc: set client response IsFault when StatusCode >= 400
Previously, we set IsFault to true if the HTTP response code not equal to
200 only, which is not always correct.
This commit changes it to check any status code that is greater or equal
to 400.
| -rw-r--r-- | lib/xmlrpc/client.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xmlrpc/client.go b/lib/xmlrpc/client.go index 0f10bde5..b38889fd 100644 --- a/lib/xmlrpc/client.go +++ b/lib/xmlrpc/client.go @@ -136,7 +136,7 @@ func (cl *Client) Send(req Request) (resp Response, err error) { } } if !resp.IsFault { - if httpRes.StatusCode != 200 { + if httpRes.StatusCode >= 400 { resp.IsFault = true } } |
