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
HTTP status code 408 causes clients to retry #1287
Comments
Which HTTP code do you propose? |
Unfortunately there is no HTTP code that would perfectly fit the purpose. We can use 400, as we do for the most other errors. |
Or 500, because timeout is a server error, not a client one. |
Sorry, forgot @InstyleVII. |
I would prefer 500 over 400, per Andreas' argument. |
I don't know that I have a preference, but @andreastt makes a good argument. I'm perfectly happy using 500. |
Whilst it is logically correct to use 408 for the timeout and script timeout errors, it causes a collision with HTTP semantics implement in HTTP clients. To support Keep-Alive we allow retries in HTTP clients and if a client sees code 408 it thinks that the server has gone away and retries the request. This causes Execute Script, Navigate To, and Refresh commands to be sent twice with some HTTP clients. This is a backwards incompatible change to WebDriver in order to not break HTTP/1.1 Keep-Alive. Fixes: #1287
For the interested, I also wrote a blog post about this change: https://sny.no/2018/08/webdriver-keepalive |
Section 6.6 contains two error codes "script timeout"and "timeout" mapped to HTTP status code 408 Request Timeout.
It might be logically correct to use this error code, but we have a collision with HTTP semantics implemented in HTTP clients. To support keep-alive we allow retries in HTTP clients, and if a client sees code 408 it thinks that the server has gone and attempts to retry the request. As a results, we have executeScript or get/refresh duplication after timeout.
What can we do?
The text was updated successfully, but these errors were encountered: