From 52b5883fed88de453e28eaf78e19b7f371410ef6 Mon Sep 17 00:00:00 2001 From: Pasupathi-Rajamanickam Date: Wed, 4 Mar 2020 19:42:10 +0000 Subject: [PATCH] fixing response header separator --- devtools/devtools.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/devtools.js b/devtools/devtools.js index 0502804..de47f16 100644 --- a/devtools/devtools.js +++ b/devtools/devtools.js @@ -66,7 +66,7 @@ function setupDebugger(target) { ajaxMe(request.url, (data) => { replaceResponse(data.response, filteredData, (replacedData) => { continueParams.responseCode = 200; - continueParams.binaryResponseHeaders = btoa(unescape(encodeURIComponent(data.getAllResponseHeaders()))); + continueParams.binaryResponseHeaders = btoa(unescape(encodeURIComponent(data.getAllResponseHeaders().replace(/(?:\r\n|\r|\n)/g, '\0')))); continueParams.body = btoa(unescape(encodeURIComponent(replacedData))); chrome.debugger.sendCommand(debugee, 'Fetch.fulfillRequest', continueParams); });