Skip to content

Commit 637866d

Browse files
authored
Merge pull request ceph#60899 from clwluvw/curl-einval
rgw: handle EINVAL translation in forward_request Reviewed-by: Casey Bodley <[email protected]>
2 parents 589b7c6 + 98772af commit 637866d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rgw/rgw_rest_client.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,9 @@ int RGWRESTSimpleRequest::forward_request(const DoutPrefixProvider *dpp, const R
453453
url = new_url;
454454

455455
int r = process(dpp, y);
456-
if (r < 0){
457-
if (r == -EINVAL){
458-
// curl_easy has errored, generally means the service is not available
456+
if (r < 0) {
457+
if (http_status == 0) {
458+
// no http status, generally means the service is not available
459459
r = -ERR_SERVICE_UNAVAILABLE;
460460
}
461461
return r;

0 commit comments

Comments
 (0)