Skip to content

Commit 26079b5

Browse files
committed
fix(mitm): cached resources to use cached status
1 parent 9fc9e2f commit 26079b5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/models/ResourcesTable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export interface IResourcesRecord {
176176
requestOriginalHeaders: string;
177177
httpError: string;
178178

179-
browserServedFromCache?: 'service-worker' | 'disk' | 'prefetch' | 'unspecified';
179+
browserServedFromCache?: 'service-worker' | 'disk' | 'prefetch' | 'memory';
180180
browserLoadFailure?: string;
181181
browserBlockedReason?: string;
182182
browserCanceled?: boolean;

mitm/lib/MitmRequestContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export default class MitmRequestContext {
154154

155155
const response = {
156156
url: ctx.responseUrl,
157-
statusCode: ctx.originalStatus,
157+
statusCode: ctx.originalStatus ?? ctx.status,
158158
statusMessage: ctx.statusMessage,
159159
headers: ctx.responseHeaders,
160160
trailers: ctx.responseTrailers,

0 commit comments

Comments
 (0)