comparison src/http/ngx_http_request.c @ 216:f1d0e5f09c1e

nginx-0.0.1-2003-12-25-23:26:58 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 25 Dec 2003 20:26:58 +0000
parents 5adc2b75f8a5
children 05592fd7a436
comparison
equal deleted inserted replaced
215:5adc2b75f8a5 216:f1d0e5f09c1e
139 if (!(r = ngx_pcalloc(c->pool, sizeof(ngx_http_request_t)))) { 139 if (!(r = ngx_pcalloc(c->pool, sizeof(ngx_http_request_t)))) {
140 ngx_http_close_connection(c); 140 ngx_http_close_connection(c);
141 return; 141 return;
142 } 142 }
143 } 143 }
144
145 r->http_state = NGX_HTTP_INITING_REQUEST_STATE;
144 146
145 /* find the server configuration for the address:port */ 147 /* find the server configuration for the address:port */
146 148
147 /* AF_INET only */ 149 /* AF_INET only */
148 150
1517 ngx_log_error(NGX_LOG_ALERT, c->log, ngx_socket_errno, 1519 ngx_log_error(NGX_LOG_ALERT, c->log, ngx_socket_errno,
1518 ngx_close_socket_n " failed"); 1520 ngx_close_socket_n " failed");
1519 } 1521 }
1520 1522
1521 c->fd = -1; 1523 c->fd = -1;
1524 c->data = NULL;
1522 1525
1523 ngx_destroy_pool(c->pool); 1526 ngx_destroy_pool(c->pool);
1524 1527
1525 return; 1528 return;
1526 } 1529 }
1543 1546
1544 r->connection->log->handler = NULL; 1547 r->connection->log->handler = NULL;
1545 1548
1546 if (ctx->url) { 1549 if (ctx->url) {
1547 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, 1550 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
1548 client_header_errors[client_error - NGX_HTTP_CLIENT_ERROR], 1551 client_header_errors[client_error - NGX_HTTP_CLIENT_ERROR],
1549 ctx->client, ctx->url); 1552 ctx->client, ctx->url);
1550 1553
1551 } else { 1554 } else {
1552 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, 1555 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
1553 client_header_errors[client_error - NGX_HTTP_CLIENT_ERROR], 1556 client_header_errors[client_error - NGX_HTTP_CLIENT_ERROR],
1554 ctx->client); 1557 ctx->client);
1555 } 1558 }
1556 1559
1557 r->connection->log->handler = ngx_http_log_error; 1560 r->connection->log->handler = ngx_http_log_error;
1558 1561
1559 ngx_http_finalize_request(r, error); 1562 ngx_http_finalize_request(r, error);