testcafe-hammerhead
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -166,6 +166,6 @@ var _classCallCheck = require('babel-runtime/helpers/class-call-check').default; | ||
var isManifest = contentTypeUtils.isManifest(contentType); | ||
var isJSON = contentTypeUtils.isJSON(contentType); | ||
var isScript = this.dest.resourceType === urlUtils.SCRIPT || contentTypeUtils.isScriptResource(contentType, accept); | ||
var requireProcessing = !this.isXhr && (this.isPage || this.isIframe || isCSS || isScript || isManifest || isJSON); | ||
var requireAssetsProcessing = (isCSS || isScript || isManifest) && this.destRes.statusCode !== 204; | ||
var requireProcessing = !this.isXhr && (this.isPage || this.isIframe || requireAssetsProcessing); | ||
@@ -193,3 +193,2 @@ var isIframeWithImageSrc = this.isIframe && !this.isPage && /^\s*image\//.test(contentType); | ||
isManifest: isManifest, | ||
isJSON: isJSON, | ||
encoding: encoding, | ||
@@ -196,0 +195,0 @@ contentTypeUrlToken: contentTypeUrlToken |
@@ -86,2 +86,4 @@ var _regeneratorRuntime = require('babel-runtime/regenerator').default; | ||
if (ctx.contentInfo.requireProcessing && ctx.destRes.statusCode === 204) ctx.destRes.statusCode = 200; | ||
// NOTE: Just pipe the content body to the browser if we don't need to process it. | ||
@@ -88,0 +90,0 @@ if (!ctx.contentInfo.requireProcessing) { |
@@ -6,5 +6,3 @@ exports.__esModule = true; | ||
exports.isManifest = isManifest; | ||
exports.isJSON = isJSON; | ||
// Const | ||
var JSON_MIME = 'application/json'; | ||
var MANIFEST_MIME = 'text/cache-manifest'; | ||
@@ -42,6 +40,2 @@ var CSS_MIME = 'text/css'; | ||
return contentTypeHeader.toLowerCase().indexOf(MANIFEST_MIME) > -1; | ||
} | ||
function isJSON(contentTypeHeader) { | ||
return contentTypeHeader.toLowerCase().indexOf(JSON_MIME) > -1; | ||
} |
{ | ||
"name": "testcafe-hammerhead", | ||
"description": "A powerful web-proxy used as a core for the TestCafe testing framework (https://github.com/DevExpress/testcafe).", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"homepage": "https://github.com/DevExpress/testcafe-hammerhead", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/DevExpress/testcafe-hammerhead/issues", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
677618
9387