comparison src/event/ngx_event_connect.c @ 32:da8c190bdaba NGINX_0_1_16

nginx 0.1.16 *) Bugfix: if the response were transferred by chunks, then on the HEAD request the final chunk was issued. *) Bugfix: the "Connection: keep-alive" header were issued, even if the keepalive_timeout directive forbade the keep-alive use. *) Bugfix: the errors in the ngx_http_fastcgi_module caused the segmentation faults. *) Bugfix: the compressed response encrypted by SSL may not transferred complete. *) Bugfix: the TCP-specific TCP_NODELAY, TCP_NOPSUH, and TCP_CORK options, are not used for the unix domain sockets. *) Feature: the rewrite directive supports the arguments rewriting. *) Bugfix: the response code 400 was returned for the POST request with the "Content-Length: 0" header; bug appeared in 0.1.14.
author Igor Sysoev <http://sysoev.ru>
date Tue, 25 Jan 2005 00:00:00 +0300
parents 7ca9bdc82b3f
children a39d1b793287
comparison
equal deleted inserted replaced
31:1b17dd824438 32:da8c190bdaba
6 6
7 #include <ngx_config.h> 7 #include <ngx_config.h>
8 #include <ngx_core.h> 8 #include <ngx_core.h>
9 #include <ngx_event.h> 9 #include <ngx_event.h>
10 #include <ngx_event_connect.h> 10 #include <ngx_event_connect.h>
11 #include <nginx.h> 11
12
13
14 /* AF_INET only */
15 12
16 ngx_int_t ngx_event_connect_peer(ngx_peer_connection_t *pc) 13 ngx_int_t ngx_event_connect_peer(ngx_peer_connection_t *pc)
17 { 14 {
18 int rc; 15 int rc;
19 ngx_uint_t instance; 16 ngx_uint_t instance;
168 165
169 return NGX_ERROR; 166 return NGX_ERROR;
170 } 167 }
171 168
172 #if (NGX_WIN32) 169 #if (NGX_WIN32)
170
173 /* 171 /*
174 * Winsock assignes a socket number divisible by 4 172 * Winsock assignes a socket number divisible by 4
175 * so to find a connection we divide a socket number by 4. 173 * so to find a connection we divide a socket number by 4.
176 */ 174 */
177 175
229 wev->log = pc->log; 227 wev->log = pc->log;
230 228
231 c->fd = s; 229 c->fd = s;
232 230
233 c->log_error = pc->log_error; 231 c->log_error = pc->log_error;
232
233 if (peer->sockaddr->sa_family != AF_INET) {
234 c->tcp_nopush = NGX_TCP_NOPUSH_DISABLED;
235 c->tcp_nodelay = NGX_TCP_NODELAY_DISABLED;
236 }
234 237
235 pc->connection = c; 238 pc->connection = c;
236 239
237 /* 240 /*
238 * TODO: MT: - atomic increment (x86: lock xadd) 241 * TODO: MT: - atomic increment (x86: lock xadd)
287 /* NGX_EINPROGRESS */ 290 /* NGX_EINPROGRESS */
288 return NGX_AGAIN; 291 return NGX_AGAIN;
289 } 292 }
290 293
291 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, pc->log, 0, "connected"); 294 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, pc->log, 0, "connected");
295
296 wev->ready = 1;
297
292 return NGX_OK; 298 return NGX_OK;
293 } 299 }
294 300
295 if (ngx_event_flags & NGX_USE_AIO_EVENT) { 301 if (ngx_event_flags & NGX_USE_AIO_EVENT) {
296 302