mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 15:55:54 +01:00
removed Context.Response.SetCustomHeader('Content-Length' in TMVCStaticContents.SendFile; See comment
This commit is contained in:
parent
fe387256ed
commit
40d7220d5d
@ -2146,7 +2146,13 @@ begin
|
||||
else
|
||||
begin
|
||||
S := TFileStream.Create(AFileName, fmOpenRead or fmShareDenyNone);
|
||||
Context.Response.SetCustomHeader('Content-Length', IntToStr(S.Size));
|
||||
//Content-Length is set in (%DELPHI%)\source\internet\Web.Win.IsapiHTTP.pas
|
||||
//procedure TISAPIResponse.SendResponse;
|
||||
//if set twice it could be a problem under IIS (ISAPI)
|
||||
//the header is available 1x but the value are doubled
|
||||
//sometimes some images are not shown
|
||||
//How to unittest this behavior?
|
||||
//Context.Response.SetCustomHeader('Content-Length', IntToStr(S.Size));
|
||||
Context.Response.SetCustomHeader('Last-Modified',
|
||||
LocalDateTimeToHttpStr(LFileDate));
|
||||
Context.Response.SetContentStream(S, AMimeType);
|
||||
|
Loading…
Reference in New Issue
Block a user