summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2021-05-19 13:43:56 +0700
committerShulhan <ms@kilabit.info>2021-05-19 13:43:56 +0700
commitb88099190a7b809e9cd4052edfbe8396322a9cff (patch)
treed60e420e710030f6f795bd9f5d10580b1bc144e2
parentbd51133fbda340542ec29ec1035b028ea112e028 (diff)
downloadpakakeh.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.go2
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
}
}