@@ -411,7 +411,7 @@ ngx_http_proxy_connect_finalize_request(ngx_http_request_t *r,
411
411
ngx_http_proxy_connect_upstream_t * u , ngx_int_t rc )
412
412
{
413
413
ngx_log_debug1 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
414
- "finalize proxy_conncet upstream request: %i" , rc );
414
+ "proxy_connect: finalize upstream request: %i" , rc );
415
415
416
416
r -> keepalive = 0 ;
417
417
@@ -428,7 +428,7 @@ ngx_http_proxy_connect_finalize_request(ngx_http_request_t *r,
428
428
if (u -> peer .connection ) {
429
429
430
430
ngx_log_debug1 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
431
- "close proxy_connect upstream connection: %d" ,
431
+ "proxy_connect: close upstream connection: %d" ,
432
432
u -> peer .connection -> fd );
433
433
434
434
if (u -> peer .connection -> pool ) {
@@ -475,7 +475,7 @@ ngx_http_proxy_connect_send_connection_established(ngx_http_request_t *r)
475
475
c = r -> connection ;
476
476
477
477
ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
478
- "proxy_connect send 200 connection established" );
478
+ "proxy_connect: send 200 connection established" );
479
479
480
480
clcf = ngx_http_get_module_loc_conf (r , ngx_http_core_module );
481
481
@@ -497,7 +497,7 @@ ngx_http_proxy_connect_send_connection_established(ngx_http_request_t *r)
497
497
498
498
if (b -> pos == b -> last ) {
499
499
ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , c -> log , 0 ,
500
- "proxy_connect sent 200 connection established" );
500
+ "proxy_connect: sent 200 connection established" );
501
501
502
502
if (c -> write -> timer_set ) {
503
503
ngx_del_timer (c -> write );
@@ -571,7 +571,7 @@ ngx_http_proxy_connect_tunnel(ngx_http_request_t *r,
571
571
u = ctx -> u ;
572
572
573
573
ngx_log_debug2 (NGX_LOG_DEBUG_HTTP , c -> log , 0 ,
574
- "http proxy_connect, fu:%ui write:%ui" ,
574
+ "proxy_connect: tunnel fu:%ui write:%ui" ,
575
575
from_upstream , do_write );
576
576
577
577
downstream = c ;
@@ -667,7 +667,7 @@ ngx_http_proxy_connect_tunnel(ngx_http_request_t *r,
667
667
|| (downstream -> read -> eof && upstream -> read -> eof ))
668
668
{
669
669
ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , c -> log , 0 ,
670
- "http proxy_connect done" );
670
+ "proxy_connect: tunnel done" );
671
671
ngx_http_proxy_connect_finalize_request (r , u , 0 );
672
672
return ;
673
673
}
@@ -780,7 +780,7 @@ ngx_http_proxy_connect_read_upstream(ngx_http_request_t *r,
780
780
ngx_http_proxy_connect_ctx_t * ctx ;
781
781
782
782
ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
783
- "proxy_connect upstream read handler" );
783
+ "proxy_connect: upstream read handler" );
784
784
785
785
ctx = ngx_http_get_module_ctx (r , ngx_http_proxy_connect_module );
786
786
@@ -839,7 +839,7 @@ ngx_http_proxy_connect_write_upstream(ngx_http_request_t *r,
839
839
c = u -> peer .connection ;
840
840
841
841
ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
842
- "proxy_connect upstream write handler" );
842
+ "proxy_connect: upstream write handler" );
843
843
844
844
if (c -> write -> timedout ) {
845
845
ngx_log_error (NGX_LOG_ERR , c -> log , 0 ,
@@ -892,7 +892,7 @@ ngx_http_proxy_connect_send_handler(ngx_http_request_t *r)
892
892
ctx = ngx_http_get_module_ctx (r , ngx_http_proxy_connect_module );
893
893
894
894
ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
895
- "proxy_connect send connection established handler" );
895
+ "proxy_connect: send connection established handler" );
896
896
897
897
if (c -> write -> timedout ) {
898
898
c -> timedout = 1 ;
@@ -927,7 +927,7 @@ ngx_http_proxy_connect_upstream_handler(ngx_event_t *ev)
927
927
lctx -> current_request = r ;
928
928
929
929
ngx_log_debug2 (NGX_LOG_DEBUG_HTTP , c -> log , 0 ,
930
- "http proxy_connect upstream handler: \"%V:%V\"" ,
930
+ "proxy_connect: upstream handler: \"%V:%V\"" ,
931
931
& r -> connect_host , & r -> connect_port );
932
932
933
933
if (ev -> write ) {
@@ -972,7 +972,7 @@ ngx_http_proxy_connect_process_connect(ngx_http_request_t *r,
972
972
rc = ngx_event_connect_peer (& u -> peer );
973
973
974
974
ngx_log_debug1 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
975
- "proxy_connect upstream connect: %i" , rc );
975
+ "proxy_connect: ngx_event_connect_peer() returns %i" , rc );
976
976
977
977
if (rc == NGX_ERROR ) {
978
978
ngx_http_proxy_connect_finalize_request (r , u ,
@@ -1050,7 +1050,7 @@ ngx_http_proxy_connect_resolve_handler(ngx_resolver_ctx_t *ctx)
1050
1050
c = r -> connection ;
1051
1051
1052
1052
ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
1053
- "proxy_connect resolve handler" );
1053
+ "proxy_connect: resolve handler" );
1054
1054
1055
1055
if (ctx -> state ) {
1056
1056
ngx_log_error (NGX_LOG_ERR , r -> connection -> log , 0 ,
@@ -1079,7 +1079,7 @@ ngx_http_proxy_connect_resolve_handler(ngx_resolver_ctx_t *ctx)
1079
1079
text , NGX_SOCKADDR_STRLEN , 0 );
1080
1080
1081
1081
ngx_log_debug1 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
1082
- "name was resolved to %V" , & addr );
1082
+ "proxy_connect: name was resolved to %V" , & addr );
1083
1083
}
1084
1084
# else
1085
1085
ngx_uint_t i ;
@@ -1089,7 +1089,7 @@ ngx_http_proxy_connect_resolve_handler(ngx_resolver_ctx_t *ctx)
1089
1089
addr = ntohl (ctx -> addrs [i ]);
1090
1090
1091
1091
ngx_log_debug4 (NGX_LOG_DEBUG_HTTP , c -> log , 0 ,
1092
- "name was resolved to %ud.%ud.%ud.%ud" ,
1092
+ "proxy_connect: name was resolved to %ud.%ud.%ud.%ud" ,
1093
1093
(addr >> 24 ) & 0xff , (addr >> 16 ) & 0xff ,
1094
1094
(addr >> 8 ) & 0xff , addr & 0xff );
1095
1095
}
@@ -1221,7 +1221,7 @@ ngx_http_proxy_connect_check_broken_connection(ngx_http_request_t *r,
1221
1221
ngx_http_proxy_connect_upstream_t * u ;
1222
1222
1223
1223
ngx_log_debug3 (NGX_LOG_DEBUG_HTTP , ev -> log , 0 ,
1224
- "http proxy_connect check client, write event:%d, \"%V:%V\"" ,
1224
+ "proxy_connect: check client, write event:%d, \"%V:%V\"" ,
1225
1225
ev -> write , & r -> connect_host , & r -> connect_port );
1226
1226
1227
1227
c = r -> connection ;
@@ -1263,16 +1263,17 @@ ngx_http_proxy_connect_check_broken_connection(ngx_http_request_t *r,
1263
1263
1264
1264
if (u -> peer .connection ) {
1265
1265
ngx_log_error (NGX_LOG_INFO , ev -> log , ev -> kq_errno ,
1266
- "kevent() reported that client prematurely closed "
1267
- "connection, so upstream connection is closed too" );
1266
+ "proxy_connect: kevent() reported that client "
1267
+ "prematurely closed connection, so upstream "
1268
+ " connection is closed too" );
1268
1269
ngx_http_proxy_connect_finalize_request (r , u ,
1269
1270
NGX_HTTP_CLIENT_CLOSED_REQUEST );
1270
1271
return ;
1271
1272
}
1272
1273
1273
1274
ngx_log_error (NGX_LOG_INFO , ev -> log , ev -> kq_errno ,
1274
- "kevent() reported that client prematurely closed "
1275
- "connection" );
1275
+ "proxy_connect: kevent() reported that client "
1276
+ "prematurely closed connection" );
1276
1277
1277
1278
if (u -> peer .connection == NULL ) {
1278
1279
ngx_http_proxy_connect_finalize_request (r , u ,
@@ -1289,7 +1290,7 @@ ngx_http_proxy_connect_check_broken_connection(ngx_http_request_t *r,
1289
1290
err = ngx_socket_errno ;
1290
1291
1291
1292
ngx_log_debug1 (NGX_LOG_DEBUG_HTTP , ev -> log , err ,
1292
- "http proxy_connect upstream recv(): %d" , n );
1293
+ "proxy_connect: upstream recv(): %d" , n );
1293
1294
1294
1295
if (ev -> write && (n >= 0 || err == NGX_EAGAIN )) {
1295
1296
return ;
@@ -1326,15 +1327,15 @@ ngx_http_proxy_connect_check_broken_connection(ngx_http_request_t *r,
1326
1327
1327
1328
if (u -> peer .connection ) {
1328
1329
ngx_log_error (NGX_LOG_INFO , ev -> log , err ,
1329
- "client prematurely closed connection, "
1330
+ "proxy_connect: client prematurely closed connection, "
1330
1331
"so upstream connection is closed too" );
1331
1332
ngx_http_proxy_connect_finalize_request (r , u ,
1332
1333
NGX_HTTP_CLIENT_CLOSED_REQUEST );
1333
1334
return ;
1334
1335
}
1335
1336
1336
1337
ngx_log_error (NGX_LOG_INFO , ev -> log , err ,
1337
- "client prematurely closed connection" );
1338
+ "proxy_connect: client prematurely closed connection" );
1338
1339
1339
1340
if (u -> peer .connection == NULL ) {
1340
1341
ngx_http_proxy_connect_finalize_request (r , u ,
@@ -1411,7 +1412,7 @@ ngx_http_proxy_connect_handler(ngx_http_request_t *r)
1411
1412
url .no_resolve = 1 ;
1412
1413
1413
1414
ngx_log_debug1 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
1414
- "connect handler: parse url: %V" , & url .url );
1415
+ "proxy_connect: connect handler: parse url: %V" , & url .url );
1415
1416
1416
1417
if (ngx_parse_url (r -> pool , & url ) != NGX_OK ) {
1417
1418
if (url .err ) {
@@ -1441,7 +1442,7 @@ ngx_http_proxy_connect_handler(ngx_http_request_t *r)
1441
1442
1442
1443
if (url .addrs ) {
1443
1444
ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
1444
- "connect network address given directly" );
1445
+ "proxy_connect: upstream address given directly" );
1445
1446
1446
1447
u -> resolved -> sockaddr = url .addrs [0 ].sockaddr ;
1447
1448
u -> resolved -> socklen = url .addrs [0 ].socklen ;
@@ -1503,7 +1504,7 @@ ngx_http_proxy_connect_handler(ngx_http_request_t *r)
1503
1504
1504
1505
if (ngx_resolve_name (rctx ) != NGX_OK ) {
1505
1506
ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
1506
- "proxy_connect fail to run resolver immediately" );
1507
+ "proxy_connect: fail to run resolver immediately" );
1507
1508
1508
1509
u -> resolved -> ctx = NULL ;
1509
1510
r -> main -> count -- ;
@@ -2021,7 +2022,7 @@ ngx_http_proxy_connect_post_read_handler(ngx_http_request_t *r)
2021
2022
2022
2023
if (!pclcf -> accept_connect ) {
2023
2024
ngx_log_error (NGX_LOG_INFO , r -> connection -> log , 0 ,
2024
- "client sent connect method" );
2025
+ "proxy_connect: client sent connect method" );
2025
2026
return NGX_HTTP_BAD_REQUEST ;
2026
2027
}
2027
2028
0 commit comments