pycontribs / pyrax

The Python SDK for the Rackspace Cloud
developer.rackspace.com
Apache License 2.0
237 stars 208 forks source link

get_account_metadata does not clean key that contains UpperCase #602

Open toopy opened 8 years ago

toopy commented 8 years ago

cf.: https://github.com/rackspace/pyrax/blob/master/pyrax/object_storage.py#L914

If get_account_headers returns something like:

{'X_Account_Meta_Temp_Url_Key': 'XXXX'}

Then the returned value remains the same instead of:

{'temp_url_key': 'XXXX'}

I think this line should be ..:

cleaned = lowkey.replace(low_prefix, "").replace("-", "_")

.. and be covered by the tests (cf.: https://github.com/rackspace/pyrax/blob/master/tests/unit/test_object_storage.py#L829)

I hope to do a PR soon if not resolved sooner ;)