I am trying to create a HEAD method for one of our services so that clients can look at the type and size of content before deciding whether to download it.
How to set length of response header content? Using an HttpContext provides ContentType, Encoding, etc., but I canβt specify the length, since I believe that this value is usually added by the framework when some content is added to the response.
Is there any other way to do this, or have I incorrectly configured the length for the HEAD request - should I add a custom header to return the size of the resource?
source
share