nghttpx: Fix occasional HTTP/2 backend connection failure with proxy
Previously if HTTP/1 proxy is used for backend connection, we read all incoming bytes from proxy including response body, which may be part of HTTP/2 protocol. While investigating this issue, we found that http_parser_execute() returns 1-less length when we call http_parser_pause() inside on_headers_complete callback. To workaround this, we increment the return value by 1. This commit also fixes possible segmentation fault error, which could be caused by the lack of stopping libev watcher in disconnect().
Showing
Please register or sign in to comment