kr/s3 — pull request #8 by psanford (2013-07-02 20:05:50+00:00)
Title: Fix signature sorting of common prefix keys.

The AwzHeaders need to be sorted by key, not key+value.

For example the following headers would sort incorrectly before this patch:

X-Amz-Copy-Source:other_object
X-Amz-Copy-Source-Range:bytes=0-960463"

In this example X-Amz-Copy-Source should sort before X-Amz-Copy-Source-Range, but sorting was happening after joining the header key and value so X-Amz-Copy-Source-Range was sorting first (b/c '-' is less than ':').

This patch sorts the keys first and then joins the strings for the signature algorithm.