playwright icon indicating copy to clipboard operation
playwright copied to clipboard

feat(plugins): send accept header in webServer url checking

Open ghost91- opened this issue 3 years ago • 2 comments

This PR sets the Accept HTTP header to */* for HTTP requests made by the webServer plugin when using a URL to check if the server has already started. So far, the Accept header was not being sent at all, which should be semantically equivalent to sending */*, according to RFC 7231. However, there are some web servers that handle this differently. Most notably, Vite's server just returns a 404 if the Accept header is missing from the request. I created https://github.com/vitejs/vite/issues/9520 in order to address the issue on their side, but I think it's also fine to just add the header here, which is why I created this PR.

ghost91- avatar Aug 04 '22 12:08 ghost91-

CLA assistant check
All CLA requirements met.

The test failures seem to be completely unrelated, from what I can tell.

Is there anything I can do to help this PR to get a review?

ghost91- avatar Aug 09 '22 08:08 ghost91-