Welcome! Log In Create A New Profile

Advanced

[nginx] SPDY: pass through the full status when available.

Valentin Bartenev
June 10, 2013 07:50AM
details: http://hg.nginx.org/nginx/rev/725fb71ab1a6
branches:
changeset: 5249:725fb71ab1a6
user: Jim Radford <radford@galvanix.com>
date: Fri Jun 07 13:16:00 2013 -0700
description:
SPDY: pass through the full status when available.

Avoid stripping the status text when proxying for compatibility with http.

diffstat:

src/http/ngx_http_spdy_filter_module.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r f5626ab8cb87 -r 725fb71ab1a6 src/http/ngx_http_spdy_filter_module.c
--- a/src/http/ngx_http_spdy_filter_module.c Mon Jun 10 14:35:00 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_header_filter(ngx_http_req
+ 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 @@ ngx_http_spdy_header_filter(ngx_http_req
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
Subject Author Views Posted

[nginx] SPDY: pass through the full status when available.

Valentin Bartenev 835 June 10, 2013 07:50AM



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

Online Users

Guests: 155
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