sbrunner/tilecloud-chain — pull request #193 by twpayne (2014-03-24 16:39:26+00:00)
Title: Don't add leading slashes to S3 keys

tilecloud's S3 library generates correct paths for S3 keys by adding a leading slash where needed (e.g. [when PUTting](https://github.com/twpayne/tilecloud/blob/master/tilecloud/lib/s3.py#L188)).

tilecloud-chain adds an extra leading slash to the WMTS Capabilities filename, so that the generated path is `//1.0.0/WMTSCapabilities.xml` by default. The double leading slash is then [interpreted as a protocol-relative URL by `urlparse`](https://github.com/twpayne/tilecloud/blob/master/tilecloud/lib/s3.py#L297) when generating the string to sign, leading the string to sign to contain the incorrect path of `/WMTSCapabilities.xml` instead of the correct path of `/1.0.0/WMTSCapabilities.xml`. This, in turn, leads to S3 refusing the PUT request because the signatures do not match,

This PR fixes the problem by removing the leading slash added to the key by tilecloud-chain.

cc @ckaenzig @asaunier