Comparing version 0.7.0 to 0.7.1
@@ -172,3 +172,11 @@ | ||
} | ||
return buf.sort().join('\n'); | ||
var headerSort = function(a, b) { | ||
// Headers are sorted lexigraphically based on the header name only. | ||
a = a.split(":")[0] | ||
b = b.split(":")[0] | ||
return a > b ? 1 : -1; | ||
} | ||
return buf.sort(headerSort).join('\n'); | ||
}; | ||
@@ -175,0 +183,0 @@ |
@@ -144,3 +144,4 @@ /*! | ||
} | ||
this.endpoint = options.bucket + '.' + domain; | ||
var port = 'undefined' == typeof options.port ? "" : ":" + options.port | ||
this.endpoint = options.bucket + '.' + domain + port; | ||
this.secure = 'undefined' == typeof options.port; | ||
@@ -170,10 +171,6 @@ | ||
Client.prototype.request = function(method, filename, headers){ | ||
var options = { host: this.endpoint, agent: this.agent } | ||
var options = { hostname: this.endpoint, agent: this.agent } | ||
, date = new Date | ||
, headers = headers || {}; | ||
if ('undefined' != typeof this.port) { | ||
options.port = this.port; | ||
} | ||
filename = encodeSpecialCharacters(ensureLeadingSlash(filename)); | ||
@@ -180,0 +177,0 @@ |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"author": "TJ Holowaychuk <tj@learnboost.com>", | ||
@@ -12,0 +12,0 @@ "contributors": [ |
@@ -362,3 +362,12 @@ # knox | ||
### Uploading With Retries and Exponential Backoff | ||
[@jergason][] created [intimidate][], a library wrapping Knox to automatically retry | ||
failed uploads with exponential backoff. This helps your app deal with intermittent | ||
connectivity to S3 without bringing it to a ginding halt. | ||
[@jergason]: https://github.com/jergason | ||
[intimidate]: https://npmjs.org/package/intimidate | ||
## Running Tests | ||
@@ -365,0 +374,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38223
926
393