Skip to content

Commit

Permalink
update: 修复browserify打包后Safari不能正确获取content-type
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghao25 committed Aug 22, 2015
1 parent ac8a5be commit 16942c5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/http_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ HttpClient.prototype.sendRequest = function (httpMethod, path, body, headers, pa
var client = this;
options.method = httpMethod;
options.headers = headers;

// 通过browserify打包后,在Safari下并不能有效处理server的content-type
// 参考ISSUE:https://github.com/jhiesey/stream-http/issues/8
options.mode = 'prefer-fast';

if (typeof signFunction === 'function') {
var promise = signFunction(this.config.credentials, httpMethod, path, params, headers);
if (isPromise(promise)) {
Expand Down

0 comments on commit 16942c5

Please sign in to comment.