Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only reset request headers after scenario if they were set
Setting manual request headers on a Chrome instance seems somewhat unlikely, but it is exposed by the Mink interface and implemented by the driver so they do need to be cleaned up as part of ->reset() if present. However, if the browser or devtools connection has crashed / hit a problemn then calling Network.setExtraHttpHeaders can fail in a way that masks and/or makes it harder to trace the actual failure. Therefore, avoid sending this call unless it is actually required (e.g. some custom headers have been set since the session started or was last reset).
- Loading branch information