Skip to content

Commit

Permalink
expose Content-Encoding option to curl for addFile()
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuriy Bogdanov authored and indexzero committed Jul 15, 2011
1 parent 7361e9f commit cb33082
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/cloudfiles/utils.js
Expand Up @@ -175,6 +175,7 @@ utils.rackspace = function () {
};

var contentTypeOptions = '-H "Content-Type: {{content-type}}" ',
contentEncodingOptions = '-H "Content-Encoding: {{content-encoding}}" ',
authTokenOptions = '-H "X-AUTH-TOKEN:{{auth-token}}" ',
headerOptions = ' -H "{{name}}:{{value}}" ',
curlOptions = '-X {{method}} {{uri}}',
Expand All @@ -186,6 +187,9 @@ utils.rackspaceCurl = function (options, callback, success) {
if (options.contentType) {
command += contentTypeOptions.replace('{{content-type}}', options.contentType);
}
if (options.contentEncoding) {
command += contentEncodingOptions.replace('{{content-encoding}}', options.contentEncoding);
}

if (options.filename) {
command += fileOptions.replace('{{filename}}', options.filename);
Expand Down

0 comments on commit cb33082

Please sign in to comment.