1
2
3
4
5
6
7
8
9
10
11
|
220.181.165.136 - - [18
/May/2015
:10:31:02 +0800]
"POST /v1/jobsHTTP/1.1"
499 0
""
"bdHttpRequest/1.0.0"
115.239.212.7 - - [18
/May/2015
:10:31:03 +0800]
"GET /v1/job/643309e3-dc73-4025-aa69-c9405c1d818fHTTP/1.1"
499 0
"http://www.baidu.com/?tn=91638679_hao_pg&s_j=1"
"Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko"
140.207.202.187 - - [18
/May/2015
:10:30:58 +0800]
"POST/v3/violations HTTP/1.1"
499 0
"-"
"-"
42.236.10.71 - - [18
/May/2015
:10:30:59 +0800]
"POST /v3/violationsHTTP/1.1"
499 0
"-"
"-"
106.120.173.17 - - [18
/May/2015
:10:30:58 +0800]
"POST/v3/violations HTTP/1.1"
499 0
"-"
"Mozilla/5.0 (Windows NT6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131Safari/537.36"
180.97.35.164 - - [18
/May/2015
:10:30:52 +0800]
"GET/v1/job/f86bdecc-2a61-4a42-bb7b-aa794b77f89b HTTP/1.1"
499 0
"http://www.baidu.com/s?word=%E5%8D%81%E5%A0%B0%E5%A4%A9%E6%B0%94&tn=sitehao123&ie=utf-8"
"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"
|
1
2
3
4
5
6
7
|
/*
* HTTP does notdefine the code
for
the
case
when a client closed
* the connectionwhile we are processing its request so we introduce
* own code to logsuch situation when a client has closed the connection
* before we even tryto send the HTTP header to it
*/
#define NGX_HTTP_CLIENT_CLOSED_REQUEST 499
|
1
2
3
4
5
6
7
8
|
(1)upstream 在收到读写事件处理之前时,会检查连接是否可用:
ngx_http_upstream_check_broken_connection,
if
(c->error) {
//connecttion
错误
……
if
(!u->cacheable) {
//upstream
的cacheable为
false
,这个值跟http_cache模块的设置有关。指示内容是否缓存。
ngx_http_upstream_finalize_request(r, u, NGX_HTTP_CLIENT_CLOSED_REQUEST);
}
}
|