나는 투표 시스템을 운영 중입니다. 세션 키는 부분적으로 브라우저 사용자 에이전트 문자열의 해시를 사용하여 생성됩니다. 아래에 페이지 추적으로 표시되는 이상한 사용자 에이전트 문자열 변경으로 인해 일부 사용자에게 오류가 발생했습니다.IE 사용자 에이전트 문자열이 양식 POST에서 크게 변경되는 이유는 무엇입니까?
각 페이지로드의 맨 처음에 PHP에서 다음 사용자가 useragent를 발견했습니다.
function useragent()
{
static $user_agent = null;
if($user_agent === null)
{
$user_agent = getenv('HTTP_USER_AGENT');
if(empty($user_agent) === true)
{
$user_agent = $_SERVER['HTTP_USER_AGENT'];
}
}
return $user_agent;
}
페이지 동작 추적은 아래와 같습니다.
[2012-09-27 13:20:50] => Array
(
[uri] => /start
[ua] => Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Sky Broadband; DS_desktopsmiley; GTB7.4; chromeframe/21.0.1180.89; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30618; playbrytetoolbar_playbryte; AskTB5.6; 789905664603; lib/6.02324)
)
[2012-09-27 13:20:50] => Array
(
[uri] => /nominees
[ua] => Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Sky Broadband; DS_desktopsmiley; GTB7.4; chromeframe/21.0.1180.89; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30618; playbrytetoolbar_playbryte; AskTB5.6; 789905664603; lib/6.02324)
)
[2012-09-27 13:21:10] => Array
(
[uri] => /nominees-save
[post] => Array
(
[category] => talent_show
[talent_show] => 5
)
[ua] => Mozilla/5.0 (Windows NT 6.0; chromeframe/21.0.1180.89) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1
)
[2012-09-27 13:21:10] => Array
(
[uri] => /vote-error
[ua] => Mozilla/5.0 (Windows NT 6.0; chromeframe/21.0.1180.89) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1
)
[2012-09-27 13:21:16] => Array
(
[uri] => /vote-start
[ua] => Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Sky Broadband; DS_desktopsmiley; GTB7.4; chromeframe/21.0.1180.89; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30618; playbrytetoolbar_playbryte; AskTB5.6; 789905664603; lib/6.02324)
)
내가 알아 차릴 세 가지가 있습니다. 1)이 사람은 툴바가 설치된 쓰레기가 있습니다. 2) Chrome 프레임이 설치되었습니다. 3) MSIE는 정상적인 페이지에는 있지만 POST 요청 및 후속 요청에는 없습니다.
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
이 HTML에 추가되고 헤더가 반환됩니다. chromeframe이 책임있는 파티입니까? 그렇다면 왜 chromeframe이 POST 요청 헤더를 하이재킹합니까? 그 이유는 무엇입니까?
크롬 프레임입니다. – buggedcom
나는 그것이 내가 손에서 생각할 수있는 것이 아니라는 것을 인정해야한다. 앞으로 어떤 것이 든 사용자 에이전트에 의존하는 것을 피하는 또 하나의 이유입니다.) – Pebbl
http://www.chromium.org/developers/how-tos/chrome-frame-getting-started/understanding-chrome-frame-user-agent – eis