diff options
| author | DawidPietrykowski <53954695+DawidPietrykowski@users.noreply.github.com> | 2025-07-28 10:22:08 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-28 10:22:08 +0200 |
| commit | f391a73731f3371d76f89477d7269cffed4bdf1c (patch) | |
| tree | 855160238d936151df609fc2cbff19c4474418fd | |
| parent | feat(web): allow specifying ip/port/cert/key through the cli (#4314) (diff) | |
| download | sl0ppij-f391a73731f3371d76f89477d7269cffed4bdf1c.tar.gz sl0ppij-f391a73731f3371d76f89477d7269cffed4bdf1c.tar.xz sl0ppij-f391a73731f3371d76f89477d7269cffed4bdf1c.zip | |
fix(web_server): Handle extracting session_token from multiple cookies (#4271)
Replaces `headers().get("cookie)` with `headers().get_all("cookie")`
because Axum splits a single `Cookie: a; b; c` into 3 separate headers
each with a single value
| -rw-r--r-- | zellij-client/src/web_client/utils.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zellij-client/src/web_client/utils.rs b/zellij-client/src/web_client/utils.rs index d9f19285..dfc40a84 100644 --- a/zellij-client/src/web_client/utils.rs +++ b/zellij-client/src/web_client/utils.rs @@ -46,7 +46,7 @@ pub fn should_use_https( pub fn parse_cookies<T>(request: &Request<T>) -> HashMap<String, String> { let mut cookies = HashMap::new(); - if let Some(cookie_header) = request.headers().get("cookie") { + for cookie_header in request.headers().get_all("cookie") { if let Ok(cookie_str) = cookie_header.to_str() { for cookie_part in cookie_str.split(';') { if let Ok(cookie) = Cookie::parse(cookie_part.trim()) { |
