Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2014-05-20 18:57:35 +0000
committerJoakim Erdfelt2014-05-20 18:57:35 +0000
commitbcf52e14f046442c8ea6e51c3e092a5a031cf404 (patch)
treedab7eaacdd798cb2520e62e2485dec31c809089b /jetty-websocket/websocket-api/src
parent3bee85423cc4049efd780b7fafcca308ee426cf6 (diff)
downloadorg.eclipse.jetty.project-bcf52e14f046442c8ea6e51c3e092a5a031cf404.tar.gz
org.eclipse.jetty.project-bcf52e14f046442c8ea6e51c3e092a5a031cf404.tar.xz
org.eclipse.jetty.project-bcf52e14f046442c8ea6e51c3e092a5a031cf404.zip
435206 - Can't add Cookie header on websocket ClientUpgradeRequest
+ Fixed competing cookie setters between WebSocketClient's use of CookieStore and UpgradeRequest.setCookies() + Added some utility methods to LazyList (for lack of existence of ListUtil or CollectionUtil in jetty-util)
Diffstat (limited to 'jetty-websocket/websocket-api/src')
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/UpgradeRequest.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/UpgradeRequest.java b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/UpgradeRequest.java
index 81059efbc3..1d000c6908 100644
--- a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/UpgradeRequest.java
+++ b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/UpgradeRequest.java
@@ -259,9 +259,12 @@ public class UpgradeRequest
public void setCookies(List<HttpCookie> cookies)
{
this.cookies.clear();
- this.cookies.addAll(cookies);
+ if (cookies != null && !cookies.isEmpty())
+ {
+ this.cookies.addAll(cookies);
+ }
}
-
+
public void setExtensions(List<ExtensionConfig> configs)
{
this.extensions.clear();

Back to the top