summaryrefslogtreecommitdiff
path: root/src/bg/RequestGuard.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/bg/RequestGuard.js')
-rw-r--r--src/bg/RequestGuard.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/bg/RequestGuard.js b/src/bg/RequestGuard.js
index 3cbc8e6..afadcda 100644
--- a/src/bg/RequestGuard.js
+++ b/src/bg/RequestGuard.js
@@ -369,12 +369,19 @@ var RequestGuard = (() => {
// check for duplicate calls
let pending = pendingRequests.get(request.requestId);
- if (pending && pending.headersProcessed) {
- debug("[WARNING] already processed ", request);
+ if (pending) {
+ if (pending.headersProcessed) {
+ debug("[WARNING] already processed ", request);
+ } else {
+ debug("onHeadersReceived", request);
+ }
+ } else {
+ debug("[WARNING] no pending information for ", request);
+ initPendingRequest(request);
+ pending = pendingRequests.get(request.requestId);
}
pending.headersProcessed = true;
- debug("onHeadersReceived", request);
let {url, documentUrl, statusCode, tabId, responseHeaders} = request;
try {