Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore: followup to proxy and http version changes (#39612)

Dmitry Gozmandd41fc7bba51
diff --git a/packages/playwright-core/src/server/bidi/bidiNetworkManager.ts b/packages/playwright-core/src/server/bidi/bidiNetworkManager.ts
index 71b44b8372..09ddcce64c 100644
--- a/packages/playwright-core/src/server/bidi/bidiNetworkManager.ts
+++ b/packages/playwright-core/src/server/bidi/bidiNetworkManager.ts
@@ -149,6 +149,7 @@ export class BidiNetworkManager {
const response = new network.Response(request.request, params.response.status, params.response.statusText, fromBidiHeaders(params.response.headers), timing, getResponseBody, false);
response._serverAddrFinished();
response._securityDetailsFinished();
+ response._setHttpVersion(params.response.protocol);
// "raw" headers are the same as "provisional" headers in Bidi.
response.setRawResponseHeaders(null);
response.setResponseHeadersSize(params.response.headersSize);
@@ -173,7 +174,6 @@ export class BidiNetworkManager {
this._deleteRequest(request._id);
response._requestFinished(responseEndTime);
}
- response._setHttpVersion(params.response.protocol);
this._page.frameManager.reportRequestFinished(request.request, response);
}
diff --git a/tests/library/proxy.spec.ts b/tests/library/proxy.spec.ts
index 05c91c7277..19a60de591 100644
--- a/tests/library/proxy.spec.ts
+++ b/tests/library/proxy.spec.ts
@@ -124,8 +124,9 @@ it.describe('should proxy local network requests', () => {
});
for (const host of ['localhost', '127.0.0.1', '[::1]']) {
- it(`should allow bypassing ${host} requests`, async ({ browserName, browserType, server, proxyServer }) => {
+ it(`should allow bypassing ${host} requests`, async ({ browserName, browserType, server, proxyServer, isLinux }) => {
it.fixme(browserName === 'firefox' && host === '[::1]', 'firefox still proxies');
+ it.fixme(browserName === 'webkit' && isLinux && host === '[::1]', 'webkit linux still proxies');
server.setRoute(`/proxied/target.html`, async (req, res) => {
res.end('<html><title>Served by the server</title></html>');