apollo-link-http
Advanced tools
Comparing version 1.6.0-alpha.4 to 1.6.0-alpha.5
@@ -70,9 +70,9 @@ (function (global, factory) { | ||
var body = partArr[1]; | ||
// Check that length of body matches the Content-Length | ||
if (new TextEncoder().encode(body).length !== contentLength) { | ||
return null; | ||
} | ||
if (body && body.length) { | ||
// Strip out the terminating boundary | ||
body = body.replace(terminatingBoundary, ''); | ||
// Check that length of body matches the Content-Length | ||
if (new TextEncoder().encode(body).length !== contentLength) { | ||
return null; | ||
} | ||
results.push(JSON.parse(body)); | ||
@@ -79,0 +79,0 @@ } |
@@ -67,9 +67,9 @@ var __extends = (this && this.__extends) || (function () { | ||
var body = partArr[1]; | ||
// Check that length of body matches the Content-Length | ||
if (new TextEncoder().encode(body).length !== contentLength) { | ||
return null; | ||
} | ||
if (body && body.length) { | ||
// Strip out the terminating boundary | ||
body = body.replace(terminatingBoundary, ''); | ||
// Check that length of body matches the Content-Length | ||
if (new TextEncoder().encode(body).length !== contentLength) { | ||
return null; | ||
} | ||
results.push(JSON.parse(body)); | ||
@@ -76,0 +76,0 @@ } |
{ | ||
"name": "apollo-link-http", | ||
"version": "1.6.0-alpha.4", | ||
"version": "1.6.0-alpha.5", | ||
"description": "HTTP transport layer for GraphQL", | ||
@@ -5,0 +5,0 @@ "author": "Evans Hauser <evanshauser@gmail.com>", |
@@ -89,6 +89,2 @@ import { | ||
let body = partArr[1]; | ||
// Check that length of body matches the Content-Length | ||
if (new TextEncoder().encode(body).length !== contentLength) { | ||
return null; | ||
} | ||
@@ -98,2 +94,6 @@ if (body && body.length) { | ||
body = body.replace(terminatingBoundary, ''); | ||
// Check that length of body matches the Content-Length | ||
if (new TextEncoder().encode(body).length !== contentLength) { | ||
return null; | ||
} | ||
results.push(JSON.parse(body) as FetchResult); | ||
@@ -100,0 +100,0 @@ } else { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
124602