simplify One984HOSTING_COOKIE grep

This commit is contained in:
Christophe B Billheimer 2021-09-10 07:25:18 -04:00
parent e992979113
commit 1312ef7e50

View File

@ -150,7 +150,7 @@ _1984hosting_login() {
_debug2 response "$response" _debug2 response "$response"
if _contains "$response" '"loggedin": true'; then if _contains "$response" '"loggedin": true'; then
One984HOSTING_COOKIE="$(grep -i '^set-cookie:' "$HTTP_HEADER" | _head_n 1 | _egrep_o 'sessionid=[^;]*;' | tr -d ';')" One984HOSTING_COOKIE="$(grep -io 'sessionid=[^;]*;' "$HTTP_HEADER" | tr -d ';')"
export One984HOSTING_COOKIE export One984HOSTING_COOKIE
_saveaccountconf_mutable One984HOSTING_COOKIE "$One984HOSTING_COOKIE" _saveaccountconf_mutable One984HOSTING_COOKIE "$One984HOSTING_COOKIE"
return 0 return 0