comparison src/http/modules/proxy/ngx_http_proxy_handler.c @ 135:e29909bd9b8a

nginx-0.0.1-2003-09-28-23:29:06 import
author Igor Sysoev <igor@sysoev.ru>
date Sun, 28 Sep 2003 19:29:06 +0000
parents 049e78b1f852
children da00cde00e8a
comparison
equal deleted inserted replaced
134:d57c6835225c 135:e29909bd9b8a
77 return NGX_HTTP_INTERNAL_SERVER_ERROR; 77 return NGX_HTTP_INTERNAL_SERVER_ERROR;
78 } 78 }
79 79
80 if (rc == NGX_OK) { 80 if (rc == NGX_OK) {
81 ngx_http_proxy_send_request(p->upstream.connection->write); 81 ngx_http_proxy_send_request(p->upstream.connection->write);
82 /* ??? */ return NGX_OK; 82 return NGX_OK;
83 } 83 }
84 84
85 if (rc == NGX_AGAIN) { 85 if (rc == NGX_AGAIN) {
86 /* ??? */ return NGX_OK; 86 /* TODO */ return NGX_OK;
87 } 87 }
88 88
89 /* rc == NGX_CONNECT_FAILED */ 89 /* rc == NGX_CONNECT_FAILED */
90 90
91 ngx_event_connect_peer_failed(&p->upstream); 91 ngx_event_connect_peer_failed(&p->upstream);
114 114
115 do { 115 do {
116 rc = ngx_event_connect_peer(&p->upstream); 116 rc = ngx_event_connect_peer(&p->upstream);
117 117
118 if (rc == NGX_OK) { 118 if (rc == NGX_OK) {
119 #if 0 119
120 copy chain and hunks p->request_hunks from p->initial_request_hunks; 120 /* copy chain and hunks p->request_hunks
121 #endif 121 from p->initial_request_hunks */
122
123 p->request_hunks = NULL;
124 if (ngx_chain_add_copy(r->pool, p->request_hunks,
125 p->initial_request_hunks) == NGX_ERROR)
126 {
127 return NGX_HTTP_INTERNAL_SERVER_ERROR;
128 }
129
130 for (ce = p->request_hunks; ce; ce = ce->next) {
131 ce->hunk->pos = ce->hunk->start;
132 }
133
134
122 c = p->connection; 135 c = p->connection;
123 wev = c->write; 136 wev = c->write;
124 137
125 break; 138 break;
126 } 139 }