From 98769f7ccf97d6a0c98438f1eab7a5705fb9920b Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Fri, 4 Sep 2015 01:07:48 +0000 Subject: [PATCH] Fix casing of Content-Type header It turns out, despite the HTTP spec declaring that header field names should be case-insensitive, some clients treat them wrongly, and consider "Content-type" to not match "Content-Type". CyberDuck was one of those clients, now fixed upstream in https://trac.cyberduck.io/ticket/8999 To reduce future occurances of this bug, fix the casing of the Content-Type header, to strictly comply with the HTTP specification (be strict about what you send, and generous about what you receive). Fixes: #12939 Backport: hammer, firefly Signed-off-by: Robin H. Johnson (cherry picked from commit 1b9fbffdc24160251b96cec820d62fb2a12b6eab) --- src/rgw/rgw_rest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index 083fa832eec0f..b77e6f74442c3 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -475,7 +475,7 @@ void end_header(struct req_state *s, RGWOp *op, const char *content_type, const int r; if (content_type) { - r = s->cio->print("Content-type: %s\r\n", content_type); + r = s->cio->print("Content-Type: %s\r\n", content_type); if (r < 0) { ldout(s->cct, 0) << "ERROR: s->cio->print() returned err=" << r << dendl; } -- 2.39.5