[PATCH] SPDY/3.1 protocol implementation

Piotr Sikora piotr at cloudflare.com
Mon Jan 27 21:53:09 UTC 2014


Hey Valentin,
shouldn't SETTINGS_INITIAL_WINDOW_SIZE point to sc->init_window? Or at
least be hardcoded to NGX_SPDY_INIT_STREAM_WINDOW and not
NGX_SPDY_STREAM_WINDOW?

--- a/src/http/ngx_http_spdy.c
+++ b/src/http/ngx_http_spdy.c
@@ -2062,7 +2062,7 @@
ngx_http_spdy_send_settings(ngx_http_spdy_connection_t *sc)
     p = ngx_spdy_frame_aligned_write_uint32(p, sscf->concurrent_streams);

     p = ngx_spdy_frame_write_flags_and_id(p, 0, NGX_SPDY_SETTINGS_INIT_WINDOW);
-    p = ngx_spdy_frame_aligned_write_uint32(p, NGX_SPDY_STREAM_WINDOW);
+    p = ngx_spdy_frame_aligned_write_uint32(p, sc->init_window);

     buf->last = p;

Also, it seems that receiving window size is hardcoded to 2GBs, which
makes flow control (which main point was to protect against single
stream, for example big POST upload, taking over whole SPDY
connection) totally useless. This value should be configureable or at
the very least set to something much more reasonable than 2GBs.

Best regards,
Piotr Sikora



More information about the nginx-devel mailing list