Project

General

Profile

Fix #12939

Content-Type header should have correct initial capitals

Added by Robin Johnson about 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
09/04/2015
Due date:
% Done:

100%


Description

Some S3/HTTP clients do not correctly implement that header field names are supposed to be case insensitive. Fix "Content-type" to "Content-Type".
CyberDuck/JetS3 was one such client, which is now also fixed https://trac.cyberduck.io/ticket/8999upstream.

This is a very long-standing subtle bug, having first being entered in the very first version of RGW.

Tracing commits with it, newest to oldest
5cc92bb2 2015-04-09 src/rgw/rgw_rest.cc
fe6cd9bc 2013-10-22 src/rgw/rgw_rest.cc
a9c9f96b 2012-09-19 src/rgw/rgw_rest.cc
9b7f223a 2011-04-15 src/rgw/rgw_rest.cc
c9135519 2011-03-08 src/s3/s3rest.cc
536a8b64 2009-07-17 src/s3/s3gw.cc
b5dcdd86 2009-06-24 src/s3/s3gw.cc
9b4e957b 2009-06-19 src/s3/s3gw.cc
4faa62da 2009-06-18 src/s3/s3gw.cc
d30cb706 2009-06-16 src/s3/s3gw.cc
2f2cb893 2009-06-12 src/s3/s3gw.cc
e5e12647 2009-06-12 src/s3/s3gw.cc FIRST VERSION!

Originally reported to Dreamhost per DHO-1137.


Related issues

Copied to rgw - Backport #13047: Content-Type header should have correct initial capitals Resolved
Copied to rgw - Backport #13048: Content-Type header should have correct initial capitals Resolved

Associated revisions

Revision 1b9fbffd (diff)
Added by Robin H. Johnson about 3 years ago

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: infernalis, hammer, firefly
Signed-off-by: Robin H. Johnson <>

Revision 98769f7c (diff)
Added by Robin H. Johnson about 3 years ago

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)

Revision db1cbe70 (diff)
Added by Robin H. Johnson about 3 years ago

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: infernalis, hammer, firefly
Signed-off-by: Robin H. Johnson <>
(cherry picked from commit 1b9fbffdc24160251b96cec820d62fb2a12b6eab)

History

#1 Updated by Nathan Cutler about 3 years ago

  • Status changed from New to In Progress

#2 Updated by Orit Wasserman about 3 years ago

  • Status changed from In Progress to Pending Backport

#3 Updated by Loic Dachary about 3 years ago

  • Backport changed from hammer, firefly, infernalis to hammer, firefly

removing infernalis from the Backport field: before infernalis is released, scheduling something to be in infernalis is done by issuing a pull request against the infernalis branch or the master branch and setting the "infernalis" milestone of the pull request. There is no cherry-picking involved at any stage.

#4 Updated by Loic Dachary almost 3 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF