This repository has been archived by the owner on Dec 18, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 526
Kestrel considers Connection: keep-alive, upgrade
as non-upgrade request
#1170
Comments
WebListener probably has the same bug. |
Yeah, it definitely seems like we're in good company :). Best to be willing to accept it on the server though. |
Yep, saw that in my work porting that over to Sockets. I'll make the fix there as well. |
@jhkimnew Can you check if this breaks IIS/ANCM as well? |
No, firefox works fine with the server behind IIS/ANCM |
In that case, because IIS is establishing the connection to Kestrel, it is fine because IIS uses |
cesarblum
pushed a commit
that referenced
this issue
Oct 24, 2016
cesarblum
pushed a commit
that referenced
this issue
Oct 24, 2016
cesarblum
pushed a commit
that referenced
this issue
Oct 24, 2016
cesarblum
pushed a commit
that referenced
this issue
Oct 27, 2016
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Firefox sends it's WebSocket upgrade request with a
Connection
header value ofkeep-alive, Upgrade
. UnfortunatelyMessageBody.For
does a strict equality check (https://github.com/aspnet/KestrelHttpServer/blob/dev/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Http/MessageBody.cs#L237) which means the WebSocket request is assigned theForContentLength
version, with a content length of 0. As a result, the connection is considered terminated before it is even established and things go haywire (specifically the first attempt to Receive a message causes an exception because the underlying connection has been terminated).We'll need to switch to either a Contains check or multiple Equals checks in order to ensure we're getting things right.
/cc @halter73
The text was updated successfully, but these errors were encountered: