Bug 179918

Summary: WebDriver: do not try to parse http body if method is not POST
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebDriverAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, darin, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch darin: review+

Carlos Garcia Campos
Reported 2017-11-21 05:26:32 PST
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.
Attachments
Patch (4.65 KB, patch)
2017-11-21 05:30 PST, Carlos Garcia Campos
darin: review+
Carlos Garcia Campos
Comment 1 2017-11-21 05:30:03 PST
Carlos Garcia Campos
Comment 2 2017-11-21 08:56:54 PST
Radar WebKit Bug Importer
Comment 3 2017-11-21 08:57:17 PST
Note You need to log in before you can comment on or make changes to this bug.