Unverified Commit ce9fae82 authored by Armando Lüscher's avatar Armando Lüscher
Browse files

Update cookie retrieval using _egrep_o (thanks @Neilpang)

parent afa3fc8b
...@@ -134,7 +134,7 @@ _cyon_print_header() { ...@@ -134,7 +134,7 @@ _cyon_print_header() {
} }
_cyon_get_cookie_header() { _cyon_get_cookie_header() {
printf "%s" "$(sed -n 's/Set-\(Cookie:.*cyon=[^;]*\).*/\1/p' "$HTTP_HEADER" | _tail_n 1)" printf "Cookie: %s" "$(cat "$HTTP_HEADER" | grep "cyon=" | grep "^Set-Cookie:" | _tail_n 1 | _egrep_o 'cyon=[^;]*;' | tr -d ';')"
} }
_cyon_login() { _cyon_login() {
......
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