FileResultExecutorBase.SetHeadersAndLog Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets etag and last modified headers.
protected virtual (Microsoft.Net.Http.Headers.RangeItemHeaderValue range, long rangeLength, bool serveBody) SetHeadersAndLog (Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.FileResult result, long? fileLength, bool enableRangeProcessing, DateTimeOffset? lastModified = default, Microsoft.Net.Http.Headers.EntityTagHeaderValue etag = default);
protected virtual (Microsoft.Net.Http.Headers.RangeItemHeaderValue? range, long rangeLength, bool serveBody) SetHeadersAndLog (Microsoft.AspNetCore.Mvc.ActionContext context, Microsoft.AspNetCore.Mvc.FileResult result, long? fileLength, bool enableRangeProcessing, DateTimeOffset? lastModified = default, Microsoft.Net.Http.Headers.EntityTagHeaderValue? etag = default);
abstract member SetHeadersAndLog : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.FileResult * Nullable<int64> * bool * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue -> ValueTuple<Microsoft.Net.Http.Headers.RangeItemHeaderValue, int64, bool>
override this.SetHeadersAndLog : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.FileResult * Nullable<int64> * bool * Nullable<DateTimeOffset> * Microsoft.Net.Http.Headers.EntityTagHeaderValue -> ValueTuple<Microsoft.Net.Http.Headers.RangeItemHeaderValue, int64, bool>
Protected Overridable Function SetHeadersAndLog (context As ActionContext, result As FileResult, fileLength As Nullable(Of Long), enableRangeProcessing As Boolean, Optional lastModified As Nullable(Of DateTimeOffset) = Nothing, Optional etag As EntityTagHeaderValue = Nothing) As ValueTuple(Of RangeItemHeaderValue, Long, Boolean)
Parameters
- context
- ActionContext
The ActionContext.
- result
- FileResult
The FileResult.
- enableRangeProcessing
- Boolean
Whether range processing is enabled.
- lastModified
- Nullable<DateTimeOffset>
The nullable lastModified date.
- etag
- EntityTagHeaderValue
The EntityTagHeaderValue.
Returns
A tuple with the RangeItemHeaderValue range, length, and whether the body was served.