@@ -440,6 +440,10 @@ <h3>Processing model</h3>
440
440
let < var > origin</ var > be the value of that header. Otherwise
441
441
let < var > origin</ var > be undefined.</ p > </ li >
442
442
443
+ < li > < p > < p > If < var > request</ var > has an < a > Content-Type header</ a > ,
444
+ let < var > content-type</ var > be the value of that header. Otherwise
445
+ let < var > content-type</ var > be undefined.</ p > </ li >
446
+
443
447
< li > < p > If any of the following conditions hold:
444
448
< ul >
445
449
< li > < p > < var > host</ var > is undefined.</ p > </ li >
@@ -476,6 +480,18 @@ <h3>Processing model</h3>
476
480
the < a > Origin header</ a > is necessary to prevent untrusted websites
477
481
from establishing a WebDriver session.</ p > </ li >
478
482
483
+ < li > < p > If < var > content-type</ var > is not undefined, and
484
+ ("< code > content-type</ code > ", < var > content-type</ var > ) is a
485
+ [=CORS-safelisted request-header=], or otherwise if the value
486
+ of < var > content-type</ var > is not a < a > Content-Type header</ a > the
487
+ implementation allows, then stop running these steps and act as if
488
+ the requested service is not available.</ p >
489
+
490
+ < p class =note > This provides an additional layer of defence against
491
+ requests originating from untrusted websites. Implementations can
492
+ choose to implement this by only accepting requests with the
493
+ "< code > application/json</ code > " Content-Type header.</ p > </ li >
494
+
479
495
< li > < p > Let < var > request match</ var > be the result of the algorithm
480
496
to < a > match a request</ a > with < var > request</ var > ’s
481
497
< a > method</ a > and < a > URL</ a > as arguments.
0 commit comments