> there is a bug in OverbyteIcsHttpSrv.pas in function FileDate
Here's a fix, if you confirm that it works I'll check it in soon
(borrowed from code in OverbyteIcsFtpSrvT.pas) :
function FileDate(FileName : String) : TDateTime;
var
SearchRec : TSearchRec;
Status: Integer;
{$IFDEF
Yep. Just change the line
Result := _FileDateToDateTime(SearchRec.Time);
to
Result :=
_FileDateToDateTime(SearchRec.FindData.ftLastWriteTime);
The correct fix should be
Result :=
_FileDateToDateTime(_FileTimeToDosDateTime(SearchRec.FindData.ftLastWriteTime));
.
Last-Modified: header should always be displayed time as GMT or UTC
Not an HTTP imposition. As long it's a valid http-date, it's fine.
There is only the need to use the same convention when sending, and
comparing these dates.
However, there is a bug in OverbyteIcsHttpSrv.pas in functio
and in THttpConnection.SendDocument(const CustomHeaders : String) :
Header := Header + 'Last-Modified: ' + RFC1123_Date(FLastModified)
+ ' GMT' + #13#10;
'GMT' is always displayed, but is it really the time on the
computer that execute the soft ? Maybe I missed something that's
why I ask you a
> and in THttpConnection.SendDocument(const CustomHeaders : String) :
> Header := Header + 'Last-Modified: ' + RFC1123_Date(FLastModified)
> + ' GMT' + #13#10;
>
> 'GMT' is always displayed, but is it really the time on the
> computer that execute the soft ? Maybe I missed something that's
> w
Hi everyone,
I used the RFC1123_Date function in OverbyteIcsHttpSrv.pas to make
header content (as Date, Cache control) but when I searched for it I
found 2 lines that I don't understand.
In THttpConnection.AnswerStreamAcceptRange :
PutStringInSendBuffer ('Last-Modified: ' + RFC1123_Date(