@@ -319,14 +319,14 @@ public async Task SendAsync()
319
319
var sendFile = _context . GetFeature < IHttpSendFileFeature > ( ) ;
320
320
if ( sendFile != null && ! string . IsNullOrEmpty ( physicalPath ) )
321
321
{
322
- await sendFile . SendFileAsync ( physicalPath , 0 , _length , _request . CallCanceled ) ;
322
+ await sendFile . SendFileAsync ( physicalPath , 0 , _length , _context . OnRequestAborted ) ;
323
323
return ;
324
324
}
325
325
326
326
Stream readStream = _fileInfo . CreateReadStream ( ) ;
327
327
try
328
328
{
329
- await StreamCopyOperation . CopyToAsync ( readStream , _response . Body , _length , _request . CallCanceled ) ;
329
+ await StreamCopyOperation . CopyToAsync ( readStream , _response . Body , _length , _context . OnRequestAborted ) ;
330
330
}
331
331
finally
332
332
{
@@ -365,15 +365,15 @@ internal async Task SendRangeAsync()
365
365
var sendFile = _context . GetFeature < IHttpSendFileFeature > ( ) ;
366
366
if ( sendFile != null && ! string . IsNullOrEmpty ( physicalPath ) )
367
367
{
368
- await sendFile . SendFileAsync ( physicalPath , start , length , _request . CallCanceled ) ;
368
+ await sendFile . SendFileAsync ( physicalPath , start , length , _context . OnRequestAborted ) ;
369
369
return ;
370
370
}
371
371
372
372
Stream readStream = _fileInfo . CreateReadStream ( ) ;
373
373
try
374
374
{
375
375
readStream . Seek ( start , SeekOrigin . Begin ) ; // TODO: What if !CanSeek?
376
- await StreamCopyOperation . CopyToAsync ( readStream , _response . Body , length , _request . CallCanceled ) ;
376
+ await StreamCopyOperation . CopyToAsync ( readStream , _response . Body , length , _context . OnRequestAborted ) ;
377
377
}
378
378
finally
379
379
{
0 commit comments