Commit 062741a6 authored by Dominika Liberda's avatar Dominika Liberda 💽

* another cookie parsing fix

parent c02cf1b2
......@@ -56,8 +56,8 @@ while read param; do
elif [[ "$param" == *"Cookie: "* ]]; then
IFS=';'
for i in $(IFS=' '; echo "$param" | sed -E 's/Cookie: //;;s/%/\\x/g'); do
name="$((grep -Poh ".*?(?==)" | head -1) <<< $i)"
value="$(sed "s/$name=//" <<< $i)"
name="$((grep -Poh "[^ ].*?(?==)" | head -1) <<< $i)"
value="$(sed "s/$name=//;s/^ //;s/ $//" <<< $i)"
cookies[$name]="$(echo -e $value)"
done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment