From 1533a2d0b57e3144c58c52dbf81114f607d2e530 Mon Sep 17 00:00:00 2001 From: Joey Bloom <15joeybloom@users.noreply.github.com> Date: Fri, 26 Mar 2021 16:07:52 -0500 Subject: [PATCH] Fix cookie-parsing bug in the example note-taking app (#761) --- examples/notes.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/notes.clj b/examples/notes.clj index 02e15588..1d005597 100755 --- a/examples/notes.clj +++ b/examples/notes.clj @@ -88,7 +88,7 @@ (defn get-session-id [headers] (if-let [cookie-header (first (filter #(str/starts-with? % "Cookie: ") headers))] - (let [parts (str/split cookie-header #"; ")] + (let [parts (str/split (str/replace cookie-header "Cookie: " "") #"; ")] (if-let [notes-id (first (filter #(str/starts-with? % "notes-id") parts))] (str/replace notes-id "notes-id=" "") (new-session!)))