Skip to content

Commit e01b122

Browse files
ahmed1hishamAli Abdelfattah
andauthored
Fix network response header value logging (#627)
* Fix network response header value logging * Update CHANGELOG.md Co-authored-by: Ali Abdelfattah <[email protected]>
1 parent 86b2549 commit e01b122

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## master
22

3+
* Fixes an issue with network header value formatting.
34
* Replaces the defaults tool with PlistBuddy for reading plist files.
45

56
## v10.8.1 (2021-08-25)

utils/XhrNetworkInterceptor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ const XHRInterceptor = {
8383
const responseHeaders = this.getAllResponseHeaders().split('\r\n');
8484
const responseHeadersDictionary = {};
8585
responseHeaders.forEach(element => {
86-
const key = element.split(':')[0];
87-
const value = element.split(':')[1];
86+
const key = element.split(/:(.+)/)[0];
87+
const value = element.split(/:(.+)/)[1];
8888
responseHeadersDictionary[key] = value;
8989
});
9090
cloneNetwork.responseHeaders = responseHeadersDictionary;

0 commit comments

Comments
 (0)