Commit 98772af
committed
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 <[email protected]>1 parent 2360022 commit 98772af
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
456 | | - | |
457 | | - | |
458 | | - | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
| |||
0 commit comments