Mercurial > hg > nginx-quic
comparison src/http/modules/proxy/ngx_http_proxy_upstream.c @ 412:199cd29f35a3
nginx-0.0.10-2004-08-31-19:32:52 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 31 Aug 2004 15:32:52 +0000 |
parents | d6e2b445c1b8 |
children | 3c56e834be46 |
comparison
equal
deleted
inserted
replaced
411:4765ded59eaa | 412:199cd29f35a3 |
---|---|
615 if (p->upstream->peer.tries > 1 && p->request_sent) { | 615 if (p->upstream->peer.tries > 1 && p->request_sent) { |
616 ngx_http_proxy_reinit_upstream(p); | 616 ngx_http_proxy_reinit_upstream(p); |
617 } | 617 } |
618 | 618 |
619 if (r->request_body->buf) { | 619 if (r->request_body->buf) { |
620 if (!(output->free = ngx_alloc_chain_link(r->pool))) { | 620 if (r->request_body->temp_file->file.fd != NGX_INVALID_FILE) { |
621 ngx_http_proxy_finalize_request(p, NGX_HTTP_INTERNAL_SERVER_ERROR); | 621 |
622 return; | 622 if (!(output->free = ngx_alloc_chain_link(r->pool))) { |
623 } | 623 ngx_http_proxy_finalize_request(p, |
624 | 624 NGX_HTTP_INTERNAL_SERVER_ERROR); |
625 output->free->buf = r->request_body->buf; | 625 return; |
626 output->free->next = NULL; | 626 } |
627 output->allocated = 1; | 627 |
628 | 628 output->free->buf = r->request_body->buf; |
629 r->request_body->buf->pos = r->request_body->buf->start; | 629 output->free->next = NULL; |
630 r->request_body->buf->last = r->request_body->buf->start; | 630 output->allocated = 1; |
631 r->request_body->buf->tag = (ngx_buf_tag_t) &ngx_http_proxy_module; | 631 |
632 r->request_body->buf->pos = r->request_body->buf->start; | |
633 r->request_body->buf->last = r->request_body->buf->start; | |
634 r->request_body->buf->tag = (ngx_buf_tag_t) &ngx_http_proxy_module; | |
635 | |
636 } else { | |
637 r->request_body->buf->pos = r->request_body->buf->start; | |
638 } | |
632 } | 639 } |
633 | 640 |
634 p->request_sent = 0; | 641 p->request_sent = 0; |
635 | 642 |
636 if (rc == NGX_AGAIN) { | 643 if (rc == NGX_AGAIN) { |
645 if (c->read->ready) { | 652 if (c->read->ready) { |
646 /* post aio operation */ | 653 /* post aio operation */ |
647 ngx_http_proxy_process_upstream_status_line(c->read); | 654 ngx_http_proxy_process_upstream_status_line(c->read); |
648 return; | 655 return; |
649 } | 656 } |
657 | |
650 #endif | 658 #endif |
651 | 659 |
652 ngx_http_proxy_send_request(p); | 660 ngx_http_proxy_send_request(p); |
653 } | 661 } |
654 | 662 |