Skip to content

Commit b39e85a

Browse files
authored
Merge pull request #238 from yanhao1991/master
修复上报日志时reqid出错
2 parents cf3728c + 4434324 commit b39e85a

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

dist/qiniu.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* GitHub: http://github.com/qiniu/js-sdk
88
*
9-
* Date: 2017-7-3
9+
* Date: 2017-7-5
1010
*/
1111

1212
/*global plupload ,moxie*/
@@ -1352,7 +1352,7 @@
13521352

13531353
// add send log for upload error
13541354
if (!op.disable_statistics_report) {
1355-
var matchedGroups = (err && err.responseHeaders && err.responseHeaders.match) ? err.responseHeaders.match(/(X-Reqid\:\ )([^,]*)/) : [];
1355+
var matchedGroups = (err && err.responseHeaders && err.responseHeaders.match) ? err.responseHeaders.match(/(X-Reqid\:\ )(\w*)/) : [];
13561356
var req_id = matchedGroups[2];
13571357
var errcode = plupload.HTTP_ERROR ? err.status : err.code;
13581358
statisticsLogger.log(
@@ -1509,7 +1509,7 @@
15091509

15101510
// send statistics log
15111511
if (!op.disable_statistics_report) {
1512-
var req_id = info.responseHeaders.match(/(X-Reqid\:\ )([^,]*)/)[2];
1512+
var req_id = info.responseHeaders.match(/(X-Reqid\:\ )(\w*)/)[2];
15131513
statisticsLogger.log(
15141514
info.status,
15151515
req_id,

0 commit comments

Comments
 (0)