Closed Bug 1396831 Opened 7 years ago Closed 7 years ago

Align HTTP status codes with specification

Categories

(Testing :: geckodriver, defect)

Version 3
defect
Not set
normal

Tracking

(firefox57 fixed)

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: ato, Assigned: ato)

References

Details

Attachments

(3 files)

The HTTP status codes used in webdriver and geckodriver
are not in sync with those in the specification.  See
https://github.com/w3c/webdriver/commit/d678562e3d5f94fa71d74aeb467214bf8dd734e1.
Blocks: 1391605
Assignee: nobody → ato
Status: NEW → ASSIGNED
Comment on attachment 8904551 [details]
Bug 1396831 - Improve readability of error_code and http_status.

https://reviewboard.mozilla.org/r/176394/#review181300
Attachment #8904551 - Flags: review?(james) → review+
Comment on attachment 8904552 [details]
Bug 1396831 - Align HTTP status codes with specification.

https://reviewboard.mozilla.org/r/176396/#review181302

::: testing/webdriver/src/error.rs:209
(Diff revision 2)
>              StaleElementReference => BadRequest,
>              Timeout => RequestTimeout,
>              UnableToCaptureScreen => BadRequest,
>              UnableToSetCookie => InternalServerError,
>              UnexpectedAlertOpen => InternalServerError,
> -            UnknownCommand => NotFound,
> +            UnknownCommand => NotImplemented,

No, we reverted the specification here because Not Implemented is specifically about methods applied to known resources, whereas this is an unknown resource.
Attachment #8904552 - Flags: review?(james) → review-
Comment on attachment 8904552 [details]
Bug 1396831 - Align HTTP status codes with specification.

https://reviewboard.mozilla.org/r/176396/#review181302

> No, we reverted the specification here because Not Implemented is specifically about methods applied to known resources, whereas this is an unknown resource.

I missed this.  Corrected to NotFound (404).
Comment on attachment 8904552 [details]
Bug 1396831 - Align HTTP status codes with specification.

https://reviewboard.mozilla.org/r/176396/#review181372
Attachment #8904552 - Flags: review?(james) → review+
Comment on attachment 8904602 [details]
Bug 1396831 - Update wdclient and wdspec expected error codes.

https://reviewboard.mozilla.org/r/176432/#review181374
Attachment #8904602 - Flags: review?(james) → review+
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b763a58280a3
Improve readability of error_code and http_status. r=jgraham
https://hg.mozilla.org/integration/autoland/rev/bcd74edc5749
Align HTTP status codes with specification. r=jgraham
https://hg.mozilla.org/integration/autoland/rev/51d6923fc314
Update wdclient and wdspec expected error codes. r=jgraham
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: