Welcome! Log In Create A New Profile

Advanced

[nginx] SPDY: refactored ngx_http_spdy_state_headers().

Valentin Bartenev
May 15, 2014 11:26AM
details: http://hg.nginx.org/nginx/rev/9a95eb9f448b
branches:
changeset: 5694:9a95eb9f448b
user: Valentin Bartenev <vbart@nginx.com>
date: Wed Apr 30 20:34:20 2014 +0400
description:
SPDY: refactored ngx_http_spdy_state_headers().

This change is similar to d2ac5cf4056d. Special flag of completeness looks
surplus when there is also a counter of frame bytes left.

diffstat:

src/http/ngx_http_spdy.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)

diffs (52 lines):

diff -r 701d6e17e42c -r 9a95eb9f448b src/http/ngx_http_spdy.c
--- a/src/http/ngx_http_spdy.c Wed Apr 30 20:34:20 2014 +0400
+++ b/src/http/ngx_http_spdy.c Wed Apr 30 20:34:20 2014 +0400
@@ -1009,7 +1009,6 @@ ngx_http_spdy_state_headers(ngx_http_spd
size_t size;
ngx_buf_t *buf;
ngx_int_t rc;
- ngx_uint_t complete;
ngx_http_request_t *r;

size = end - pos;
@@ -1019,12 +1018,8 @@ ngx_http_spdy_state_headers(ngx_http_spd
ngx_http_spdy_state_headers);
}

- if (size >= sc->length) {
+ if (size > sc->length) {
size = sc->length;
- complete = 1;
-
- } else {
- complete = 0;
}

r = sc->stream->request;
@@ -1089,7 +1084,7 @@ ngx_http_spdy_state_headers(ngx_http_spd

if (buf->last - buf->pos < NGX_SPDY_NV_NUM_SIZE) {

- if (complete) {
+ if (sc->length == 0) {
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"premature end of spdy header block");

@@ -1181,7 +1176,7 @@ ngx_http_spdy_state_headers(ngx_http_spd
continue;
}

- if (complete) {
+ if (sc->length == 0) {
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"premature end of spdy header block");

@@ -1225,7 +1220,7 @@ ngx_http_spdy_state_headers(ngx_http_spd
return ngx_http_spdy_state_headers_error(sc, pos, end);
}

- if (!complete) {
+ if (sc->length) {
return ngx_http_spdy_state_save(sc, pos, end,
ngx_http_spdy_state_headers);
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] SPDY: refactored ngx_http_spdy_state_headers().

Valentin Bartenev 542 May 15, 2014 11:26AM



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

Online Users

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