2013-03-05 2 views
2

Почему Chrome отправляет запрос HEAD? Пример в журналах:Запрос Chrome HEAD?

2013-03-04 07:43:51 W3SVC7 NS1 GET /page.html 80 - *.*.*.* HTTP/1.1 Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.22+(KHTML,+like+Gecko)+Chrome/25.0.1364.97+Safari/537.22 

2013-03-04 07:43:51 W3SVC7 NS1 HEAD/- 80 - *.*.*.* HTTP/1.1 Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.22+(KHTML,+like+Gecko)+Chrome/25.0.1364.97+Safari/537.22 

У меня есть система бана, и запрос эта голова действительно раздражает, и его происходит точно так же, второй с запросом GET.

Какова его природа? любая помощь оценивается.

p.s: Я заметил, что запросы на голову все только на моей домашней странице.

ответ

0

RFC 2616 состояние:

9.4 HEAD 

The HEAD method is identical to GET except that the server MUST NOT 
return a message-body in the response. The metainformation contained 
in the HTTP headers in response to a HEAD request SHOULD be identical 
to the information sent in response to a GET request. This method can 
be used for obtaining metainformation about the entity implied by the 
request without transferring the entity-body itself. This method is 
often used for testing hypertext links for validity, accessibility, 
and recent modification. 

The response to a HEAD request MAY be cacheable in the sense that the 
information contained in the response MAY be used to update a 
previously cached entity from that resource. If the new field values 
indicate that the cached entity differs from the current entity (as 
would be indicated by a change in Content-Length, Content-MD5, ETag 
or Last-Modified), then the cache MUST treat the cache entry as 
stale. 

Скорее всего, это пытается проверить клиент куков/сеанс действительно с сервером.

+0

Итак, я предполагаю, что код на стороне сервера все еще выполняется при отправке запроса HEAD? Странно, но это происходит только с немногими людьми, которые посещают веб-сайт из тысячи в день ... – galgai

+0

По сути, это должно изменить значение cookie только в том случае, если сеанс изменен. Поскольку запрос выполняется в корневом документе '/', ваше значение cookie, скорее всего, будет установлено в домене. Если ваша корневая страница является динамической, она может сообщить клиенту, изменится ли значение eTag. (для кэширования). Возможно, они используют плагин браузера, такой как SiteAdvisor от McAffee, который делает свой собственный запрос на вашем сайте. –

Смежные вопросы