From 16942c521e059eae65b9b8e25ddd991f17c38951 Mon Sep 17 00:00:00 2001 From: zhanghao25 Date: Sat, 22 Aug 2015 12:31:32 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E4=BF=AE=E5=A4=8Dbrowserify=E6=89=93?= =?UTF-8?q?=E5=8C=85=E5=90=8ESafari=E4=B8=8D=E8=83=BD=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E8=8E=B7=E5=8F=96content-type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/http_client.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/http_client.js b/src/http_client.js index f81dd41..67cb67d 100644 --- a/src/http_client.js +++ b/src/http_client.js @@ -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)) {