-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Description
Continuing the discussion from here:
I don't think anyone would appreciate stalling when an unexpected override is passed or expected header is not passed, immediately throwing a validation error in that case sounds more user friendly.
Agreed but it's not Playwright that is stalling but the browser and in general we can't predict what overrides would make it stall.
use the original request values for the forbidden headers and ignore overrides for those
I would throw in this case.
Do you want to throw whenever a forbidden header is in the overrides? That would break tests that use Request.headers() (which includes the forbidden headers in Firefox) for the overrides.
How about this: we could filter the forbidden headers from Request.headers() and then throw when a test tries to add one of them to the overrides. That would also make Request.headers() more consistent across browsers. We'd also need to keep the unfiltered headers so we can add the forbidden headers to the BiDi network.continueRequest command.
@yury-s What do you think?