Welcome! Log In Create A New Profile

Advanced

[PATCH] SPDY: fix bug that "tcp_nopush off" doesnt work

Xiaochen Wang
December 13, 2013 12:44AM
See the patch as following:

# HG changeset patch
# User Xiaochen Wang <wangxiaochen0@gmail.com>
# Date 1386913049 -28800
# Node ID 9af659c4cf71e668183d6a3e2abe1effb89ced22
# Parent f6258a7092e4edc24ee084944eda8a460c549970
SPDY: fix bug that "tcp_nopush off" doesnt work

ngx_http_update_location_config() set NGX_TCP_NOPUSH_DISABLED to fake
connection originally.
In such case, ngx_http_spdy_send_output_queue :: c->send_chain() always
sets tcp_nopush for sendfile().

diff -r f6258a7092e4 -r 9af659c4cf71 src/http/ngx_http_core_module.c
--- a/src/http/ngx_http_core_module.c Thu Dec 12 20:28:48 2013 +0400
+++ b/src/http/ngx_http_core_module.c Fri Dec 13 13:37:29 2013 +0800
@@ -1520,6 +1520,13 @@
if (!clcf->tcp_nopush) {
/* disable TCP_NOPUSH/TCP_CORK use */
r->connection->tcp_nopush = NGX_TCP_NOPUSH_DISABLED;
+
+#if (NGX_HTTP_SPDY)
+ if (r->spdy_stream) {
+ r->spdy_stream->connection->connection->tcp_nopush =
+ NGX_TCP_NOPUSH_DISABLED;
+ }
+#endif
}

if (r->limit_rate == 0) {
# HG changeset patch
# User Xiaochen Wang <wangxiaochen0@gmail.com>
# Date 1386913049 -28800
# Node ID 9af659c4cf71e668183d6a3e2abe1effb89ced22
# Parent f6258a7092e4edc24ee084944eda8a460c549970
SPDY: fix bug that "tcp_nopush off" doesnt work

ngx_http_update_location_config() set NGX_TCP_NOPUSH_DISABLED to fake
connection originally.
In such case, ngx_http_spdy_send_output_queue :: c->send_chain() always
sets tcp_nopush for sendfile().

diff -r f6258a7092e4 -r 9af659c4cf71 src/http/ngx_http_core_module.c
--- a/src/http/ngx_http_core_module.c Thu Dec 12 20:28:48 2013 +0400
+++ b/src/http/ngx_http_core_module.c Fri Dec 13 13:37:29 2013 +0800
@@ -1520,6 +1520,13 @@
if (!clcf->tcp_nopush) {
/* disable TCP_NOPUSH/TCP_CORK use */
r->connection->tcp_nopush = NGX_TCP_NOPUSH_DISABLED;
+
+#if (NGX_HTTP_SPDY)
+ if (r->spdy_stream) {
+ r->spdy_stream->connection->connection->tcp_nopush =
+ NGX_TCP_NOPUSH_DISABLED;
+ }
+#endif
}

if (r->limit_rate == 0) {
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] SPDY: fix bug that "tcp_nopush off" doesnt work

Xiaochen Wang 771 December 13, 2013 12:44AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 131
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready