Ticket #1026: patch-src-http-ngx_http_request.c

File patch-src-http-ngx_http_request.c, 740 bytes (added by iamasmith.home@…, 10 years ago)

Disable shutdown on SSL connections in ngx_http_set_lingering_close

Line 
1--- src/http/ngx_http_request.c.orig 2016-07-15 23:00:14.912225000 +0100
2+++ src/http/ngx_http_request.c 2016-07-15 23:05:55.255155000 +0100
3@@ -3216,11 +3216,13 @@
4 }
5 }
6
7- if (ngx_shutdown_socket(c->fd, NGX_WRITE_SHUTDOWN) == -1) {
8- ngx_connection_error(c, ngx_socket_errno,
9- ngx_shutdown_socket_n " failed");
10- ngx_http_close_request(r, 0);
11- return;
12+ if (!c->ssl) {
13+ if (ngx_shutdown_socket(c->fd, NGX_WRITE_SHUTDOWN) == -1) {
14+ ngx_connection_error(c, ngx_socket_errno,
15+ ngx_shutdown_socket_n " failed");
16+ ngx_http_close_request(r, 0);
17+ return;
18+ }
19 }
20
21 if (rev->ready) {