]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: handle EINVAL translation in forward_request 60899/head
authorSeena Fallah <seenafallah@gmail.com>
Sun, 1 Dec 2024 15:24:56 +0000 (16:24 +0100)
committerSeena Fallah <seenafallah@gmail.com>
Thu, 5 Dec 2024 19:13:54 +0000 (20:13 +0100)
commit98772afc55787d81f2da867a84b66c653f90b9d1
treede39e1b6e16f135d1c4e07c379913f633652ba59
parent236002230ab5107bf48c51c75392f57844ddef39
rgw: handle EINVAL translation in forward_request

RGWRESTSimpleRequest::forward_request() translates EINVAL to a 503
status code to reflect connection errors as internal errors rather
than client errors. However, if the master is explicitly returning
EINVAL (which corresponds to an HTTP 400 status code), this
translation incorrectly converts it to 503, hiding the true client
error.

To address this, we now check the HTTP status code to ensure the
error originates from easy_curl and not from a valid HTTP response,
preserving the intended 400 status when appropriate.

Fixes: https://tracker.ceph.com/issues/69084
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
src/rgw/rgw_rest_client.cc