Skip to content

Commit 5556015

Browse files
authored
Fix parsing of 0-length header values. Fixes #60
1 parent f0cdfd1 commit 5556015

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default typeof fetch=='function' ? fetch.bind() : function(url, options)
2525
headers = {},
2626
header;
2727

28-
request.getAllResponseHeaders().replace(/^(.*?):\s*([\s\S]*?)$/gm, (m, key, value) => {
28+
request.getAllResponseHeaders().replace(/^(.*?):\s*?([\s\S]*?)$/gm, (m, key, value) => {
2929
keys.push(key = key.toLowerCase());
3030
all.push([key, value]);
3131
header = headers[key];

0 commit comments

Comments
 (0)