Skip to content

Conversation

@shinrich
Copy link
Member

This is a concern about the commit created from PR #2106. I like the commit in general, but this bit that closes the HTTP2 session if the origin response comes back with Connection: close seems wrong.

In the HTTP/1.1 case we do not propagate connection close from origin to client. According the HTTP standard the connection header is a hop-by-hop header and should not be propagated in any case. The HttpTransactHeaders::copy_header_fields() will drop the hop-by-hop headers when moving between client and origin (or origin and client).

I noticed this while testing a build. The http2 test would fail due to errors about not being able to start new streams due to a half open session. Track it down to the fact that the shutdown timer was being initiated after the first response (which had the connection: close header).

@shinrich shinrich added this to the 8.0.0 milestone Jan 31, 2018
@shinrich shinrich self-assigned this Jan 31, 2018
@shinrich shinrich requested review from masaori335 and maskit January 31, 2018 20:44
@maskit
Copy link
Member

maskit commented Feb 1, 2018

If Connection: close is propagated, that's the problem. However, the block is just using the header sent from ATS, if I implemented correctly.

If response header between ATS and a client has Connection: close, that means that ATS (core or some plugins) wants to close the connection. Since Connection: close header is not available on H2, that block initiates graceful shutdown instead.

@zizhong
Copy link
Member

zizhong commented Feb 1, 2018

yea, I feel like you removed the wrong block.

Copy link
Contributor

@zwoop zwoop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeh, this feels wrong, we should talk to try to understand what exactly the problem is.

@shinrich
Copy link
Member Author

shinrich commented Feb 2, 2018

Hmm. You are right. This is just handling the response from ATS to client. I encountered this problem running autest on my H2 to origin branch, so my directions got a bit messed up. I did have this check excluded for the other direction.

I still think there is a problem with the http2 autest, but it may be a test set up issue instead of a core issue. Will close this for now and dig into this further.

@shinrich shinrich closed this Feb 2, 2018
@maskit
Copy link
Member

maskit commented Feb 2, 2018

@shinrich Maybe because of ignore_keep_alive()? I made it to return false to handle the the case I explained above, but it returns true on your http2_origin_passthrough_dechunked branch.

@zwoop zwoop removed this from the 8.0.0 milestone May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants