Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

HTTP/2: implement 100-continue - #2106

Merged
halter73 merged 2 commits into
devfrom
cesarbs/http2-100-continue
Oct 18, 2017
Merged

HTTP/2: implement 100-continue#2106
halter73 merged 2 commits into
devfrom
cesarbs/http2-100-continue

Conversation

@cesarblum

Copy link
Copy Markdown
Contributor

No description provided.


protected override void OnReadStarting()
{
TryProduceContinue();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks to me like the 100-continue response is being sent every time the body of an "Expect: 100-continue" request is read.

Shouldn't this instead behave like HTTP/1.1 where we do not send the 100-continue response if the request body is already available when the app starts reading it?

@cesarblum
cesarblum force-pushed the cesarbs/http2-100-continue branch from 5fd8067 to dd5718c Compare October 16, 2017 21:16
@cesarblum
cesarblum force-pushed the cesarbs/http2-100-continue branch from dd5718c to ef2d60f Compare October 16, 2017 21:26
@cesarblum

Copy link
Copy Markdown
Contributor Author

Forgot to comment that I've updated this to have the same behavior as we have with HTTP/1.x.

@analogrelay

Copy link
Copy Markdown
Contributor

Ping on this @halter73 . If it looks good to you, I'll get it merged. Somewhat deferring to you here though since I haven't had a chance to catch up on this code and I don't want to hold this PR open any longer :).

@analogrelay analogrelay self-assigned this Oct 18, 2017
{
var awaitable = _context.RequestBodyPipe.Reader.ReadAsync();

if (!awaitable.IsCompleted)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@anurse Ideally we would only check this once per-request like we do for HTTP/1.1 instead of per-read like is done here. This might not be so easy with multiple streams per connection. I'll look into merging this tomorrow.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You mean checking _send100Continue I assume?

@halter73

Copy link
Copy Markdown
Member

@anurse Can you review? I updated this to check _send100Continue less. This should also prevent the PR from hurting HTTP/1.1 perf.

@halter73
halter73 merged commit 3fbfba6 into dev Oct 18, 2017
@halter73
halter73 deleted the cesarbs/http2-100-continue branch October 18, 2017 23:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants