Browse Source

simplify One984HOSTING_COOKIE grep

Christophe B Billheimer 4 năm trước cách đây
mục cha
commit
1312ef7e50
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      dnsapi/dns_1984hosting.sh

+ 1 - 1
dnsapi/dns_1984hosting.sh

@@ -150,7 +150,7 @@ _1984hosting_login() {
   _debug2 response "$response"
 
   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
     _saveaccountconf_mutable One984HOSTING_COOKIE "$One984HOSTING_COOKIE"
     return 0