| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f11f3e1 commit fe653a0
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -616,6 +616,10 @@ public async Task<HttpResponseMessage> SendAsyncCore(HttpRequestMessage request, | |||
| 616 | 616 | _connectionClose = true; | |
| 617 | 617 | ||
| 618 | 618 | } | |
| 619 | + else if (response.StatusCode == HttpStatusCode.SwitchingProtocols) | ||
| 620 | + { | ||
| 621 | + responseStream = new RawConnectionStream(this); | ||
| 622 | + } | ||
| 619 | 623 | else if (response.Content.Headers.ContentLength != null) | |
| 620 | 624 | { | |
| 621 | 625 | long contentLength = response.Content.Headers.ContentLength.GetValueOrDefault(); | |
@@ -633,10 +637,6 @@ public async Task<HttpResponseMessage> SendAsyncCore(HttpRequestMessage request, | |||
| 633 | 637 | { | |
| 634 | 638 | responseStream = new ChunkedEncodingReadStream(this); | |
| 635 | 639 | } | |
| 636 | - else if (response.StatusCode == HttpStatusCode.SwitchingProtocols) | ||
| 637 | - { | ||
| 638 | - responseStream = new RawConnectionStream(this); | ||
| 639 | - } | ||
| 640 | 640 | else | |
| 641 | 641 | { | |
| 642 | 642 | responseStream = new ConnectionCloseReadStream(this); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,6 +27,7 @@ public static async Task<bool> WebSocketHandshakeAsync(LoopbackServer.Connection | |||
| 27 | 27 | string responseSecurityAcceptValue = ComputeWebSocketHandshakeSecurityAcceptValue(headerValue); | |
| 28 | 28 | serverResponse = | |
| 29 | 29 | "HTTP/1.1 101 Switching Protocols\r\n" + | |
| 30 | + "Content-Length: 0\r\n" + | ||
| 30 | 31 | "Upgrade: websocket\r\n" + | |
| 31 | 32 | "Connection: Upgrade\r\n" + | |
| 32 | 33 | "Sec-WebSocket-Accept: " + responseSecurityAcceptValue + "\r\n\r\n"; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments