This is an automated email from the ASF dual-hosted git repository. rnewson pushed a commit to branch auto-purge-ctype in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit ac3873fd6d8dd696d15fce4083dacbf535a3d652 Author: Robert Newson <[email protected]> AuthorDate: Mon Dec 1 12:24:39 2025 +0000 validate content-type for PUT /db/_auto_purge --- src/chttpd/src/chttpd_db.erl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/chttpd/src/chttpd_db.erl b/src/chttpd/src/chttpd_db.erl index 8585a5d84..5ef69f33f 100644 --- a/src/chttpd/src/chttpd_db.erl +++ b/src/chttpd/src/chttpd_db.erl @@ -398,6 +398,7 @@ handle_auto_purge_req(#httpd{method = 'GET'} = Req, Db) -> chttpd:send_error(Req, Reason) end; handle_auto_purge_req(#httpd{method = 'PUT'} = Req, Db) -> + chttpd:validate_ctype(Req, "application/json"), {AutoPurgeProps} = chttpd:json_body_obj(Req), validate_auto_purge_props(AutoPurgeProps), case fabric:set_auto_purge_props(Db, AutoPurgeProps) of
