Skip to content

Commit

Permalink
[java] no longer accept session requests with desiredCapabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Jan 5, 2024
1 parent 0ebddde commit b74d940
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions java/src/org/openqa/selenium/remote/NewSessionPayload.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,6 @@ private void writeMetaData(JsonOutput out) throws IOException {
String name = input.nextName();
switch (name) {
case "capabilities":
// These fields were used by the (now defunct) JSON Wire Protocol, but we
// keep them here since we might see them from ancient clients.
case "desiredCapabilities":
case "requiredCapabilities":
input.skipValue();
break;

Expand Down Expand Up @@ -256,7 +252,7 @@ public Set<Dialect> getDownstreamDialects() {

public Map<String, Object> getMetadata() {
Set<String> ignoredMetadataKeys =
Set.of("capabilities", "desiredCapabilities", "requiredCapabilities");
Set.of("capabilities", "requiredCapabilities");

try (Reader reader =
new InputStreamReader(backingStore.asByteSource().openBufferedStream(), UTF_8);
Expand Down

0 comments on commit b74d940

Please sign in to comment.