From b88099190a7b809e9cd4052edfbe8396322a9cff Mon Sep 17 00:00:00 2001 From: Shulhan Date: Wed, 19 May 2021 13:43:56 +0700 Subject: 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. --- lib/xmlrpc/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } } -- cgit v1.3