HTTP HEAD Request and System.Web.Mvc.FileResult

Posted by mnero0429 on Stack Overflow See other posts from Stack Overflow or by mnero0429
Published on 2011-02-04T18:29:29Z Indexed on 2011/02/19 15:25 UTC
Read the original article Hit count: 319

Filed under:
|
|

I'm using BITS to make requests to a ASP.NET MVC controller method named Source that returns a FileResult. I know the type FilePathResult uses HttpResponse.TransmitFile, but I don't know if HttpResponse.TransmitFile actually writes the file to the response stream regardless of the request type.

My question is, does FileResult only include the header information on HEAD requests, or does it transmit the file regardless of the request type? Or, do I have to account for HEAD requests myself?

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about head