aristidb / aws

Amazon Web Services for Haskell
BSD 3-Clause "New" or "Revised" License
239 stars 108 forks source link

Fix padding in Date header for GCP compatibility #214

Closed implr closed 8 years ago

implr commented 8 years ago

On single-digit days (like today), rfc822Time produces a Date header like this:

Date: Tue, 8 Nov 2016 20:50:14 GMT

with two spaces between the comma and 8. Google's XML API rejects this, saying that a header is malformed. It seems they are being very strict in their interpretation of the RFC - if I'm reading it correctly, it specifies a comma, single space and one or two digits after that.

Anyway, changing the space to a zero seems to fix it. I checked that this does not break Amazon's S3, but didn't try any other services.

aristidb commented 8 years ago

Too bad that it will only be possible to really check these changes next month, but I'm sure it'll work fine.