~titusx/nginx/mainline

Viewing all changes in revision 6666.

  • Committer: Sergey Kandaurov
  • Date: 2020-02-05 13:29:23 UTC
  • Revision ID: git-v1:16168dcb01ed5dbf6365be0d9ea0da68bf479194
HTTP/2: fixed socket leak with an incomplete HEADERS frame.

A connection could get stuck without timers if a client has partially sent
the HEADERS frame such that it was split on the individual header boundary.
In this case, it cannot be processed without the rest of the HEADERS frame.

The fix is to call ngx_http_v2_state_headers_save() in this case.  Normally,
it would be called from the ngx_http_v2_state_header_block() handler on the
next iteration, when there is not enough data to continue processing.  This
isn't the case if recv_buffer became empty and there's no more data to read.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: