Automattic / knox

S3 Lib
MIT License
1.74k stars 285 forks source link

Make sure headers are always lowercase to avoid duplicate headers #307

Open LJ1102 opened 8 years ago

LJ1102 commented 8 years ago

Some methods inject headers like 'Content-Length' or 'Content-Type', however when the user provided headers were not the exact same casing(eg. 'Content-type' instead of 'Content-Type') both headers were sent, in cases where their content did not match this resulted in S3 resetting the connection without a clear error message.