Permalink
Browse files

Support Tolerance Provision when parsing headers

  • Loading branch information...
1 parent ccea05d commit eac7a2b9d37020a813ab34f5d722e1d4181422db @woudini woudini committed Dec 6, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 fetch.js
View
@@ -355,7 +355,7 @@
function parseHeaders(rawHeaders) {
var headers = new Headers()
- rawHeaders.split('\r\n').forEach(function(line) {
+ rawHeaders.split(/\r?\n/).forEach(function(line) {
var parts = line.split(':')
var key = parts.shift().trim()
if (key) {

0 comments on commit eac7a2b

Please sign in to comment.