comparison src/http/modules/proxy/ngx_http_proxy_handler.c @ 178:a8ff48d26cca

nginx-0.0.1-2003-11-11-00:09:22 import
author Igor Sysoev <igor@sysoev.ru>
date Mon, 10 Nov 2003 21:09:22 +0000
parents 4db54fdbcbe7
children c966c09be66b
comparison
equal deleted inserted replaced
177:4db54fdbcbe7 178:a8ff48d26cca
501 static char *ngx_http_proxy_log_proxy_state(ngx_http_request_t *r, char *buf, 501 static char *ngx_http_proxy_log_proxy_state(ngx_http_request_t *r, char *buf,
502 uintptr_t data) 502 uintptr_t data)
503 { 503 {
504 ngx_http_proxy_ctx_t *p; 504 ngx_http_proxy_ctx_t *p;
505 505
506 p = ngx_http_get_module_ctx(r, ngx_http_proxy_module); 506 p = ngx_http_get_module_err_ctx(r, ngx_http_proxy_module);
507 507
508 if (p == NULL) { 508 if (p == NULL) {
509 *buf = '-'; 509 *buf = '-';
510 return buf + 1; 510 return buf + 1;
511 } 511 }
518 cache_states[p->state->cache_state - 1].len); 518 cache_states[p->state->cache_state - 1].len);
519 } 519 }
520 520
521 *buf++ = '/'; 521 *buf++ = '/';
522 522
523 *buf++ = 'X'; 523 *buf++ = '_';
524 524
525 *buf++ = '/'; 525 *buf++ = '/';
526 526
527 *buf++ = 'X'; 527 *buf++ = '_';
528
529 *buf++ = '/';
530
531 *buf++ = '_';
528 532
529 *buf++ = ' '; 533 *buf++ = ' ';
530 534
531 if (p->state->status == 0) { 535 if (p->state->status == 0) {
532 *buf++ = '-'; 536 *buf++ = '-';
552 556
553 } else { 557 } else {
554 buf += ngx_snprintf(buf, NGX_TIME_LEN, TIME_FMT, p->state->expires); 558 buf += ngx_snprintf(buf, NGX_TIME_LEN, TIME_FMT, p->state->expires);
555 } 559 }
556 560
561 *buf++ = ' ';
562 *buf++ = '_';
563
557 return buf; 564 return buf;
558 } 565 }
559 566
560 567
561 static char *ngx_http_proxy_log_cache_state(ngx_http_request_t *r, char *buf, 568 static char *ngx_http_proxy_log_cache_state(ngx_http_request_t *r, char *buf,
562 uintptr_t data) 569 uintptr_t data)
563 { 570 {
564 ngx_http_proxy_ctx_t *p; 571 ngx_http_proxy_ctx_t *p;
565 572
566 p = ngx_http_get_module_ctx(r, ngx_http_proxy_module); 573 p = ngx_http_get_module_err_ctx(r, ngx_http_proxy_module);
567 574
568 if (p == NULL || p->state->cache_state == 0) { 575 if (p == NULL || p->state->cache_state == 0) {
569 *buf = '-'; 576 *buf = '-';
570 return buf + 1; 577 return buf + 1;
571 } 578 }
578 static char *ngx_http_proxy_log_reason(ngx_http_request_t *r, char *buf, 585 static char *ngx_http_proxy_log_reason(ngx_http_request_t *r, char *buf,
579 uintptr_t data) 586 uintptr_t data)
580 { 587 {
581 ngx_http_proxy_ctx_t *p; 588 ngx_http_proxy_ctx_t *p;
582 589
583 p = ngx_http_get_module_ctx(r, ngx_http_proxy_module); 590 p = ngx_http_get_module_err_ctx(r, ngx_http_proxy_module);
584 591
585 if (p == NULL || p->state->reason == 0) { 592 if (p == NULL || p->state->reason == 0) {
586 *buf = '-'; 593 *buf = '-';
587 return buf + 1; 594 return buf + 1;
588 } 595 }