Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit db8d626

Browse files
committed
use HttpStatusCode.OK instead of cast to (int)200
1 parent 009a855 commit db8d626

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, Can
484484
responseStream = EmptyReadStream.Instance;
485485
ReturnConnectionToPool();
486486
}
487-
else if (request.Method == s_httpConnectMethod && (int)response.StatusCode == 200)
487+
else if (request.Method == s_httpConnectMethod && response.StatusCode == HttpStatusCode.OK)
488488
{
489489
// Successful response to CONNECT does not have body.
490490
// What ever comes next should be opaque.

0 commit comments

Comments
 (0)