New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intercepted requests won't return with some status codes #4454
Comments
aslushnikov
added a commit
to aslushnikov/puppeteer
that referenced
this issue
Jun 10, 2019
Teach `request.respond()` to accept custom status text. It is necessary when responding with non-standard HTTP status codes. Fix puppeteer#4454
@angrykoala sorry for this regression. This happens because we don't have default status codes for non-standard HTTP status codes. When #4554 lands, you'll be able specify both interceptedRequest.respond({
status: 422,
statusText: 'fake',
body: "FAKE"
}) |
In which Puppeteer version is this expected to be released? |
@angrykoala 1.18 - it'll be on June, 21st |
aslushnikov
added a commit
to aslushnikov/puppeteer
that referenced
this issue
Jun 11, 2019
Migration onto fetch domain (2265974) changed the way we generate status texts: instead of relying on build-in list of statuses, we tried to rely upon the [Chromium implementation](https://cs.chromium.org/chromium/src/net/http/http_status_code_list.h?sq=package:chromium&g=0) Puppeteer's list is much more exhaustive - let's keep it. Fix puppeteer#4454
aslushnikov
added a commit
that referenced
this issue
Jun 11, 2019
Migration onto fetch domain (2265974) changed the way we generate status texts: instead of relying on build-in list of statuses, we tried to rely upon the [Chromium implementation](https://cs.chromium.org/chromium/src/net/http/http_status_code_list.h?sq=package:chromium&g=0). Puppeteer's list is much more exhaustive - let's keep it. Fix #4454
This was referenced Feb 3, 2020
This was referenced Feb 22, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Puppeteer 1.16.0 and 1.15.0, trying to make a fake response with the interceptor will not behave properly with some status codes (e.g. 422)
Steps to reproduce
Tell us about your environment:
What steps will reproduce the problem?
Having the following webpage being served at
http://localhost:3000/requests.html
:And the following code with puppeteer:
What is the expected result?
The following log should appear
(behaves as expected with Puppeteer 1.14.0)
What happens instead?
The request is never completed:
If changing the status code to 400 the request behaves as expected:
This appear to be happening with status codes from 421 to 451
The same behavior seems to be happening with non-valid status codes (e.g. 309). All this cases are working as expected on 1.14.0
The text was updated successfully, but these errors were encountered: