简体   繁体   中英

Strange request, there is one comma before HTTP_COOKIE

There is one comma, when tracking the request and var_dump $_SERVER. This caused the web user can not get information by session. Why? How can i sovle it.

[HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
[HTTP_ACCEPT_ENCODING] => gzip,deflate
[HTTP_ACCEPT_LANGUAGE] => zh-CN, en-US
[HTTP_ACCEPT_CHARSET] => utf-8, iso-8859-1, utf-16, *;q=0.7
[HTTP_COOKIE] => , FRONTEND=vkq1nq69lhequ5v1v7kor2sj71
[PATH] => /usr/local/bin:/usr/bin:/bin

To me the application sets multiple cookies with the same name, one of it with an empty key and an empty value.

The browser receive the empty cookie and send it back the next request, thus having ", ..." instead of "key=value, ...".

I'd suggest you to inspect your application for wrong setcookie() and header('Cookie:') functions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM