Skip to content

"IllegalArgumentException: blank element" by GraphQLWebsocketServlet.modifyHandshake (in jetty 12.0.16) #586

Description

@sitepark-veltrup

After updating to Jetty 12.0.16 I get the following exception:

Caused by: java.lang.IllegalArgumentException: blank element
	at org.eclipse.jetty.http.HttpField$MultiHttpField.buildValue(HttpField.java:741) ~[jetty-http-12.0.16.jar:12.0.16]
	at org.eclipse.jetty.http.HttpField$MultiHttpField.<init>(HttpField.java:731) ~[jetty-http-12.0.16.jar:12.0.16]
	at org.eclipse.jetty.http.HttpFields$Mutable.put(HttpFields.java:1312) ~[jetty-http-12.0.16.jar:12.0.16]
	at org.eclipse.jetty.websocket.core.server.internal.WebSocketHttpFieldsWrapper.put(WebSocketHttpFieldsWrapper.java:128) ~[jetty-websocket-core-server-12.0.16.jar:12.0.16]
	at org.eclipse.jetty.http.HttpFieldsMap$Mutable.put(HttpFieldsMap.java:85) ~[jetty-http-12.0.16.jar:12.0.16]
	at org.eclipse.jetty.http.HttpFieldsMap$Mutable.put(HttpFieldsMap.java:39) ~[jetty-http-12.0.16.jar:12.0.16]
	at graphql.kickstart.servlet.GraphQLWebsocketServlet.modifyHandshake(GraphQLWebsocketServlet.java:216) ~[graphql-java-servlet-16.0.0.jar:?]
       ...

The reason for this is probably this adjustment in the Jetty. It is no longer permitted to set empty header values here.

However, this is the case here.

Because here the protocol list is created and the fallbackSubscriptionProtocolFactory is used to create a factory with an empty string as the protocol.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions