So after some investigation I have found that ECS is case sensitive when sending headers when sending via S3 and expects the case to be all lower case. I also went and validated that AWS is not case sensitive. Does anyone know if this will get changed to more closely match AWS?
I did some additional testing in our lab here and it turns out ECS currently does store the metadata name verbatim (case sensitive). This was tested using the AWS CLI against ECS 2.2. Uppercase metadata names are stored and returned as uppercase (if you PUT x-amz-meta-Foo, you will GET x-amz-meta-Foo).
Pondering the HTTP spec a bit, there is no expectation of case, since the headers are supposed to be case-insensitive. So really it is up to the sub-spec (S3) to determine whether case matters. Technically neither implementation is "wrong", but since compatibility trumps, we should probably store the names as lowercase. I will create the bug and bump the priority for the next release.
After running a few of my own tests, it appears that, even if you specify capital letters in the metadata name, AWS stores the name in lowercase. So when you HEAD the object afterward, you will see x-amz-meta-auther: me every time. Applications must be aware of this or they will not read the correct values, so it would behoove you to always use lowercase metadata names anyway.
That said, I'll open a bug to accept uppercase metadata names and store them as lowercase (to mimic AWS). However, it will be low priority, so I can't say when it might get pushed into a release.
chris_arnett
1 Rookie
•
110 Posts
3139
0
Posted March 2nd, 2016 07:00
I did some additional testing in our lab here and it turns out ECS currently does store the metadata name verbatim (case sensitive). This was tested using the AWS CLI against ECS 2.2. Uppercase metadata names are stored and returned as uppercase (if you PUT x-amz-meta-Foo, you will GET x-amz-meta-Foo).
Pondering the HTTP spec a bit, there is no expectation of case, since the headers are supposed to be case-insensitive. So really it is up to the sub-spec (S3) to determine whether case matters. Technically neither implementation is "wrong", but since compatibility trumps, we should probably store the names as lowercase. I will create the bug and bump the priority for the next release.