Repository navigation
rgw: add Allow on 405 and use 501 for unknown HTTP methods - #73206
RaminNietzsche wants to merge 3 commits into
Conversation
|
jenkins test make check |
b7e436c to
05193ec
Compare
RFC 9110 RGW audit — series contextThis PR is one focused change from an RFC 9110 conformance review of RGW (S3, Swift, Admin, STS). Each PR is meant to review and merge on its own; there is no batch dependency unless called out below.
Same audit, already tracked on other PRs (not part of this series authorship):
Follow-ups from the audit not opened yet: T4d Shared repro script and sample output: https://gist.github.com/RaminNietzsche/818ad8dd6b8d8093560183cd09d2b169 ( This PR (T5): §15.5.6 |
|
jenkins test make check |
6662d19 to
7cadc05
Compare
|
jenkins test api |
RFC 9110 requires an Allow header on 405 responses and treats unrecognized methods as 501. Probe REST handlers for supported methods when emitting 405, and map OP_UNKNOWN to NotImplemented. Fixes: https://tracker.ceph.com/issues/82235 Signed-off-by: ramin.najarbashi <[email protected]>
Ensure _object_url inserts a slash between the RGW port and the tenant/path prefix when the prefix has no leading slash. Signed-off-by: ramin.najarbashi <[email protected]>
Build raw request URLs from get_config_endpoint(), matching _get_post_url(), so path-style and tenant prefixes match the boto3 client in ceph-pr-api runs. Signed-off-by: ramin.najarbashi <[email protected]>
|
Rebased on current Latest jenkins test make check |
7cadc05 to
ad5ee20
Compare
|
Force-pushed rebased tip jenkins test make check |
|
jenkins test windows |
Summary
Allowheader on HTTP 405 responses from REST handlers, listing methods the handler can dispatch for the current request (RFC 9110 §15.5.6).PATCH,TRACE, …) with501 Not Implementedinstead of405when no operation is registered forOP_UNKNOWN.Related: #72114 (501 for unimplemented S3 sub-resources). Repro gist: https://gist.github.com/RaminNietzsche/818ad8dd6b8d8093560183cd09d2b169 (cases T5).
Test plan
jenkins test make checktest_object_unrecognized_http_method_not_implemented,test_object_unsupported_http_method_allow_headercurl -X PATCH→ 501;curl -X COPYon S3 object → 405 +AllowChecklist