[PATCH] SPDY: Allow returning the full status line

Jim Radford radford at galvanix.com
Thu May 30 21:34:34 UTC 2013


# HG changeset patch
# User Jim Radford <radford at galvanix.com>
# Date 1369948357 25200
# Node ID 5b75a45ba4deae4b0047357d9bdad7472a83ea3d
# Parent  00dbfac67e48a8fe20802287b6fca50950178b8b
SPDY: Allow returning the full status line

diff -r 00dbfac67e48 -r 5b75a45ba4de src/http/ngx_http_spdy_filter_module.c
--- a/src/http/ngx_http_spdy_filter_module.c	Thu May 30 18:23:05 2013 +0400
+++ b/src/http/ngx_http_spdy_filter_module.c	Thu May 30 14:12:37 2013 -0700
@@ -304,8 +304,14 @@
     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_sprintf(last, "%03ui", r->headers_out.status);
+    if (r->headers_out.status_line.len) {
+        last = ngx_http_spdy_nv_write_vlen(last, r->headers_out.status_line.len);
+        last = ngx_cpymem(last, r->headers_out.status_line.data,
+                          r->headers_out.status_line.len);
+    } else {
+        last = ngx_spdy_frame_write_uint16(last, 3);
+        last = ngx_sprintf(last, "%03ui", r->headers_out.status);
+    }
 
     count = 2;
 



More information about the nginx-devel mailing list