This repository was archived by the owner on Dec 18, 2018. It is now read-only.
File tree 2 files changed +16
-16
lines changed
src/Microsoft.AspNet.Server.Kestrel/Http 2 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -232,10 +232,8 @@ public async Task RequestProcessingAsync()
232
232
233
233
await ProduceEnd ( ) ;
234
234
235
- while ( await MessageBody . SkipAsync ( ) != 0 )
236
- {
237
- // Finish reading the request body in case the app did not.
238
- }
235
+ // Finish reading the request body in case the app did not.
236
+ await MessageBody . Consume ( ) ;
239
237
}
240
238
241
239
terminated = ! _keepAlive ;
Original file line number Diff line number Diff line change @@ -38,20 +38,22 @@ protected MessageBody(FrameContext context)
38
38
return result ;
39
39
}
40
40
41
- public Task < int > SkipAsync ( CancellationToken cancellationToken = default ( CancellationToken ) )
41
+ public async Task Consume ( CancellationToken cancellationToken = default ( CancellationToken ) )
42
42
{
43
- Task < int > result = null ;
44
- var send100Continue = 0 ;
45
- result = SkipAsyncImplementation ( cancellationToken ) ;
46
- if ( ! result . IsCompleted )
47
- {
48
- send100Continue = Interlocked . Exchange ( ref _send100Continue , 0 ) ;
49
- }
50
- if ( send100Continue == 1 )
43
+ Task < int > result ;
44
+ do
51
45
{
52
- _context . FrameControl . ProduceContinue ( ) ;
53
- }
54
- return result ;
46
+ var send100Continue = 0 ;
47
+ result = SkipAsyncImplementation ( cancellationToken ) ;
48
+ if ( ! result . IsCompleted )
49
+ {
50
+ send100Continue = Interlocked . Exchange ( ref _send100Continue , 0 ) ;
51
+ }
52
+ if ( send100Continue == 1 )
53
+ {
54
+ _context . FrameControl . ProduceContinue ( ) ;
55
+ }
56
+ } while ( await result != 0 ) ;
55
57
}
56
58
57
59
public abstract Task < int > ReadAsyncImplementation ( ArraySegment < byte > buffer , CancellationToken cancellationToken ) ;
You can’t perform that action at this time.
0 commit comments