* fix another cookie bug
This commit is contained in:
parent
062741a66a
commit
45f26274c8
|
@ -17,6 +17,11 @@ post=false
|
||||||
get=false
|
get=false
|
||||||
|
|
||||||
while read param; do
|
while read param; do
|
||||||
|
name=''
|
||||||
|
value=''
|
||||||
|
data=''
|
||||||
|
unset IFS
|
||||||
|
|
||||||
if [[ "$param" == $'\015' ]]; then
|
if [[ "$param" == $'\015' ]]; then
|
||||||
break
|
break
|
||||||
|
|
||||||
|
@ -52,7 +57,7 @@ while read param; do
|
||||||
|
|
||||||
elif [[ "$param" == *"Authorization: Bearer"* ]]; then
|
elif [[ "$param" == *"Authorization: Bearer"* ]]; then
|
||||||
r[authorization]="$(printf "$param" | sed 's/Authorization: Bearer //;s/\r//')"
|
r[authorization]="$(printf "$param" | sed 's/Authorization: Bearer //;s/\r//')"
|
||||||
|
|
||||||
elif [[ "$param" == *"Cookie: "* ]]; then
|
elif [[ "$param" == *"Cookie: "* ]]; then
|
||||||
IFS=';'
|
IFS=';'
|
||||||
for i in $(IFS=' '; echo "$param" | sed -E 's/Cookie: //;;s/%/\\x/g'); do
|
for i in $(IFS=' '; echo "$param" | sed -E 's/Cookie: //;;s/%/\\x/g'); do
|
||||||
|
@ -89,8 +94,7 @@ while read param; do
|
||||||
value="$(echo $i | sed "s/$name\=//")"
|
value="$(echo $i | sed "s/$name\=//")"
|
||||||
post_data[$name]="$value"
|
post_data[$name]="$value"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue