Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
WebDriver: do not try to parse http body if method is not POST
https://bugs.webkit.org/show_bug.cgi?id=179918 Reviewed by Darin Adler. As said in the spec: 5. If request’s method is POST: 1. Let parse result be the result of parsing as JSON with request’s body as the argument. If this process throws an exception, return an error with error code invalid argument and jump back to step 1 in this overall algorithm. 2. If parse result is not an Object, send an error with error code invalid argument and jump back to step 1 in this overall algorithm. Otherwise, let parameters be parse result. Otherwise, let parameters be null. 6.3 Processing Model https://w3c.github.io/webdriver/webdriver-spec.html#processing-model Now, w3c tests are sending null as body of delete session command (it used to be just empty), making it fail with invalid argument error. * WebDriverService.cpp: (WebDriver::WebDriverService::findCommand): (WebDriver::WebDriverService::handleRequest): * WebDriverService.h: Canonical link: https://commits.webkit.org/195951@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
b16d5f6
commit 149ca51
Showing
3 changed files
with
43 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters