From b6da487b95f5e237e2717c072f2b749ccf533fb5 Mon Sep 17 00:00:00 2001 From: Julian Descottes Date: Thu, 9 Jan 2025 08:57:57 +0100 Subject: [PATCH] chore(bidi): Handle headers properly in BiDi network.continueRequest --- .../playwright-core/src/server/bidi/bidiNetworkManager.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/playwright-core/src/server/bidi/bidiNetworkManager.ts b/packages/playwright-core/src/server/bidi/bidiNetworkManager.ts index b7c314bd1076d..44012606b99f3 100644 --- a/packages/playwright-core/src/server/bidi/bidiNetworkManager.ts +++ b/packages/playwright-core/src/server/bidi/bidiNetworkManager.ts @@ -67,9 +67,13 @@ export class BidiNetworkManager { if (param.intercepts) { // We do not support intercepting redirects. if (redirectedFrom) { + let params = {}; + if (redirectedFrom._originalRequestRoute?._alreadyContinuedHeaders) + params = toBidiRequestHeaders(redirectedFrom._originalRequestRoute._alreadyContinuedHeaders ?? []); + this._session.sendMayFail('network.continueRequest', { request: param.request.request, - ...(redirectedFrom._originalRequestRoute?._alreadyContinuedHeaders || {}), + ...params, }); } else { route = new BidiRouteImpl(this._session, param.request.request);