skoobe/riofs — pull request #70 by lloydcotten (2014-09-25 03:18:45+00:00)
Title: Send in x-amz-security-token header when configured (for use with IAM roles)

First of all I apologize for the commit spam.

I added `s3.session_token` key to the `copy_entries` array in `main.c`. Also added a condition to check for the `AWS_SESSION_TOKEN` env variable and assign to the config when set.

In `http_connection.c` I added a condition in the `http_connection_make_request` method to check to see if the `s3.session_token` has been set and add the `x-amz-security-token` header to the request.

I chose `AWS_SESSION_TOKEN` as the env name as it makes it compatible with the AWS CLI. I referred to it as "session token" throughout the code and config for consistency.