File tree 1 file changed +9
-6
lines changed
src/Microsoft.AspNetCore.Server.Kestrel/Internal/Http
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -865,13 +865,16 @@ private void CreateResponseHeader(
865
865
866
866
responseHeaders . SetReadOnly ( ) ;
867
867
868
- if ( ! _keepAlive && ! hasConnection )
868
+ if ( ! hasConnection )
869
869
{
870
- responseHeaders . SetRawConnection ( "close" , _bytesConnectionClose ) ;
871
- }
872
- else if ( _keepAlive && ! hasConnection && _httpVersion == Http . HttpVersion . Http10 )
873
- {
874
- responseHeaders . SetRawConnection ( "keep-alive" , _bytesConnectionKeepAlive ) ;
870
+ if ( ! _keepAlive )
871
+ {
872
+ responseHeaders . SetRawConnection ( "close" , _bytesConnectionClose ) ;
873
+ }
874
+ else if ( _httpVersion == Http . HttpVersion . Http10 )
875
+ {
876
+ responseHeaders . SetRawConnection ( "keep-alive" , _bytesConnectionKeepAlive ) ;
877
+ }
875
878
}
876
879
877
880
if ( ServerOptions . AddServerHeader && ! responseHeaders . HasServer )
You can’t perform that action at this time.
0 commit comments