Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookie parseHeader方法解析cookie需要增加容错 #138

Open
ppanphper opened this issue Sep 25, 2021 · 1 comment
Open

Cookie parseHeader方法解析cookie需要增加容错 #138

ppanphper opened this issue Sep 25, 2021 · 1 comment

Comments

@ppanphper
Copy link

image

$kvs = explode(';', $header); // 需要去除";"后的空格,因为有些服务设置cookie没有在分号后追加空格

$cookie['value'] = str_replace(['''', '""'], '', trim($nv[1])); // 去除首位空格

$kv = explode('=', trim($kv)); // 同上

@sy-records
Copy link
Member

欢迎PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants