[twsocket] RFC1123_Date

2012-04-25 Thread ROQUES Guillaume
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: ' +

Re: [twsocket] RFC1123_Date

2012-04-25 Thread Angus Robertson - Magenta Systems Ltd
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

Re: [twsocket] RFC1123_Date

2012-04-25 Thread RTT
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

Re: [twsocket] RFC1123_Date

2012-04-25 Thread RTT
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));

Re: [twsocket] RFC1123_Date

2012-04-25 Thread Arno Garrels
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