Mercurial > hg > nginx-quic
comparison src/http/ngx_http_spdy.c @ 5642:d2ac5cf4056d
SPDY: refactored ngx_http_spdy_state_read_data().
There's no more need in a separate indicator of frame completeness
after d74889fbf06d.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Mon, 07 Apr 2014 19:27:56 +0400 |
parents | 0aeb6f63d242 |
children | 436f3605195a |
comparison
equal
deleted
inserted
replaced
5641:0aeb6f63d242 | 5642:d2ac5cf4056d |
---|---|
1496 { | 1496 { |
1497 size_t size; | 1497 size_t size; |
1498 ssize_t n; | 1498 ssize_t n; |
1499 ngx_buf_t *buf; | 1499 ngx_buf_t *buf; |
1500 ngx_int_t rc; | 1500 ngx_int_t rc; |
1501 ngx_uint_t complete; | |
1502 ngx_temp_file_t *tf; | 1501 ngx_temp_file_t *tf; |
1503 ngx_http_request_t *r; | 1502 ngx_http_request_t *r; |
1504 ngx_http_spdy_stream_t *stream; | 1503 ngx_http_spdy_stream_t *stream; |
1505 ngx_http_request_body_t *rb; | 1504 ngx_http_request_body_t *rb; |
1506 ngx_http_core_loc_conf_t *clcf; | 1505 ngx_http_core_loc_conf_t *clcf; |
1521 return ngx_http_spdy_state_skip(sc, pos, end); | 1520 return ngx_http_spdy_state_skip(sc, pos, end); |
1522 } | 1521 } |
1523 | 1522 |
1524 size = end - pos; | 1523 size = end - pos; |
1525 | 1524 |
1526 if (size >= sc->length) { | 1525 if (size > sc->length) { |
1527 size = sc->length; | 1526 size = sc->length; |
1528 complete = 1; | |
1529 | |
1530 } else { | |
1531 complete = 0; | |
1532 } | 1527 } |
1533 | 1528 |
1534 r = stream->request; | 1529 r = stream->request; |
1535 | 1530 |
1536 if (r->request_body == NULL | 1531 if (r->request_body == NULL |
1598 } | 1593 } |
1599 | 1594 |
1600 r->request_length += size; | 1595 r->request_length += size; |
1601 } | 1596 } |
1602 | 1597 |
1603 if (!complete) { | 1598 if (sc->length) { |
1604 return ngx_http_spdy_state_save(sc, pos, end, | 1599 return ngx_http_spdy_state_save(sc, pos, end, |
1605 ngx_http_spdy_state_read_data); | 1600 ngx_http_spdy_state_read_data); |
1606 } | 1601 } |
1607 | 1602 |
1608 if (sc->flags & NGX_SPDY_FLAG_FIN) { | 1603 if (sc->flags & NGX_SPDY_FLAG_FIN) { |