Delen via


FileResultExecutorBase.SetHeadersAndLog Method

Definition

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

result
FileResult

The FileResult.

fileLength
Nullable<Int64>

The nullable file length.

enableRangeProcessing
Boolean

Whether range processing is enabled.

lastModified
Nullable<DateTimeOffset>

The nullable lastModified date.

Returns

A tuple with the RangeItemHeaderValue range, length, and whether the body was served.

Applies to