# HG changeset patch # User Jim Radford <radf...@galvanix.com> # Date 1370636160 25200 # Node ID 18018b06ed3103c8a0e841e59913daa8bab1c03c # Parent 55dc535ae5dc9d9ffb9bf9d163f9c7d298a56f87 SPDY: pass though the full status when available.
Avoid stripping the status text when proxying for compatibility with http. diff -r 55dc535ae5dc -r 18018b06ed31 src/http/ngx_http_spdy_filter_module.c --- a/src/http/ngx_http_spdy_filter_module.c Wed Jun 05 19:45:08 2013 +0400 +++ b/src/http/ngx_http_spdy_filter_module.c Fri Jun 07 13:16:00 2013 -0700 @@ -162,7 +162,9 @@ + ngx_http_spdy_nv_nsize("version") + ngx_http_spdy_nv_vsize("HTTP/1.1") + ngx_http_spdy_nv_nsize("status") - + ngx_http_spdy_nv_vsize("418"); + + (r->headers_out.status_line.len + ? NGX_SPDY_NV_VLEN_SIZE + r->headers_out.status_line.len + : ngx_http_spdy_nv_vsize("418")); clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); @@ -304,8 +306,15 @@ last = ngx_http_spdy_nv_write_val(last, "HTTP/1.1"); last = ngx_http_spdy_nv_write_name(last, "status"); - last = ngx_http_spdy_nv_write_vlen(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_http_spdy_nv_write_vlen(last, 3); + last = ngx_sprintf(last, "%03ui", r->headers_out.status); + } count = 2; _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel