-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MEDIUM: h2: prevent stream opening before connection reverse completed
HTTP/2 demux must be handled with care for active reverse connection. Until accept has been completed, it should be forbidden to handle HEADERS frame as session is not yet ready to handle streams. To implement this, use the flag H2_CF_DEM_TOOMANY which blocks demux process. This flag is automatically set just after conn_reverse() invocation. The flag is removed on rev_accept_conn() callback via a new H2 ctl enum. H2 tasklet is woken up to restart demux process. As a side-effect, reporting in H2 mux may be blocked as demux functions are used to convert error status at the connection level with CO_FL_ERROR. To ensure error is reported for a reverse connection, check h2c_is_dead() specifically for this case in h2_wake(). This change also has its own side-effect : h2c_is_dead() conditions have been adjusted to always exclude !h2c->conn->owner condition which is always true for reverse connection or else H2 mux may kill them unexpectedly.
- Loading branch information
1 parent
40fb55b
commit 08fffb7
Showing
3 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters