]> git.kaiwu.me - nginx.git/commitdiff
SPDY: use proper macros for value length and headers counter.
authorValentin Bartenev <vbart@nginx.com>
Tue, 4 Jun 2013 22:13:52 +0000 (02:13 +0400)
committerValentin Bartenev <vbart@nginx.com>
Tue, 4 Jun 2013 22:13:52 +0000 (02:13 +0400)
Currently these macros are synonyms, but this may change in the future
(in particular, spdy/3 uses 4 bytes for lengths).

src/http/ngx_http_spdy_filter_module.c

index 8fe46b2e9546af4c1a82dc2fd2afb3df2bf0fda0..bc0089f667bba12e3f5fa2085db307633e3dffdc 100644 (file)
@@ -304,7 +304,7 @@ ngx_http_spdy_header_filter(ngx_http_request_t *r)
     last = ngx_http_spdy_nv_write_val(last, "HTTP/1.1");
 
     last = ngx_http_spdy_nv_write_name(last, "status");
-    last = ngx_spdy_frame_write_uint16(last, 3);
+    last = ngx_http_spdy_nv_write_vlen(last, 3);
     last = ngx_sprintf(last, "%03ui", r->headers_out.status);
 
     count = 2;
@@ -500,7 +500,7 @@ ngx_http_spdy_header_filter(ngx_http_request_t *r)
         count++;
     }
 
-    (void) ngx_spdy_frame_write_uint16(buf, count);
+    (void) ngx_http_spdy_nv_write_num(buf, count);
 
     stream = r->spdy_stream;
     sc = stream->connection;