Re: [twsocket] Creating a TSslWebAppSrv component

2011-11-28 Thread Busai Péter
What do you mean not nice? This is the whole point of OOP. :) Actually it is not that simple. I don't want to put TSslHttpAppSrv in the original unit of THttpAppSrv because SVN will complain every time I do a check-out. I tried to put it in a new unit, however it seems THttpAppSrv and TUrlHandler

[twsocket] Creating a TSslWebAppSrv component

2011-11-27 Thread Busai Péter
Hi, I wonder what is the proper way, to derive from TSslHttpServer and copy all the AppServer stuff or to derive from THttpAppSrv and add the SSL stuff? Regards Peter -- To unsubscribe or change your settings for TWSocket mailing list please goto

[twsocket] Evaluating TOverbyteIcsSysLogServer

2011-11-11 Thread Busai Péter
Hi, Some bugs: OverbyteIcsSysLogServerDemo: FSysLogServer component is created runtime on form creation, but SysLogServer1DataAvailable method is not assigned to FSysLogServer.OnDataAvailable anywhere. TSysLogServer.ParseRawMessageRFC5424: From line 400 to 457 Date and Time values are read

Re: [twsocket] Evaluating TOverbyteIcsSysLogServer

2011-11-11 Thread Busai Péter
If client hostname contains negative sign - , for example somename-peter, than between lines 520-532 it is evaluated as invalid PID delimter and an exception is raised. I dont know if this is a valid hostname for that RFC Some digging in the RFCs: http://tools.ietf.org/html/rfc5424#page-13

Re: [twsocket] Evaluating TOverbyteIcsSysLogServer

2011-11-11 Thread Busai Péter
Hello Peter, Thanks for your feedback. While you are at it, maybe you could fix the issues you see and propose it to the community ? Before doing that, be sure to download the very latest development snapshot, preferably directly out of the SVN repository. Then make your changes and submit

Re: [twsocket] Problem with UTF8 and Thttpappserv

2011-03-10 Thread Busai Péter
FileCodepage is to tell the component the encoding of template file. DstCodepage is for the result. You can have a template file in different encoding than you want the result. Peter Hi Arno, yeees great, That works. I've tried with different languages (polish,german ...) and it is ok, but

Re: [twsocket] HttpAppServer Finish question

2011-01-30 Thread Busai Péter
Thanks. I send answer and call Finish in OnTerminate event. AFAIK that runs in main thread context. Peter 2011.01.30. 15:51 keltezéssel, Francois PIETTE írta: You have to call Finish in the contrext of the thread running UrlHandler.Execute, not your worker thread. It is not important that it

Re: [twsocket] Another unicode issue

2011-01-28 Thread Busai Péter
{$ENDIF} ); StreamWriteStrA(DestStream, TagValue {$IFDEF COMPILER12_UP} ,DestCodePage {$ENDIF} ); Peter 2011.01.27. 21:35 keltezéssel, Busai Péter írta

Re: [twsocket] Another unicode issue

2011-01-28 Thread Busai Péter
I just checked in the change. If you use SVN you should revert previous changes before update in order to avoid conflicts, Resolve conflicts using 'theirs' is just one click ;) Peter -- To unsubscribe or change your settings for TWSocket mailing list please goto

Re: [twsocket] Another unicode issue

2011-01-27 Thread Busai Péter
on Delphi XE, but had no time to test it on ansi compiler. Thank you very much Peter 2011.01.27. 18:22 keltezéssel, Arno Garrels írta: Arno Garrels wrote: Busai Péter wrote: In HttpAppServer, URLHandler Call Client.AnswerPage(Flags,'','','template.html',nil,['SOMEKEY','A']); The value

[twsocket] HttpAppServer, how to alter client.path

2011-01-26 Thread Busai Péter
Hi, I'm trying to create nested virtual document names like for example: /Admin/Serverinfo I created an URLHandler for that HttpAppSrv.AddGetHandler('/Admin/ServerInfo', TUrlHandlerAdmin); Images for web page are contained in {docroot}/images directory In the template document I use relative path

Re: [twsocket] HttpAppServer, how to alter client.path

2011-01-26 Thread Busai Péter
I found AddGetAllowedPath in demo project. Is that something to to do with this? What is it doing? Not much comment about it in the source. Peter Hi, I'm trying to create nested virtual document names like for example: /Admin/Serverinfo I created an URLHandler for that

Re: [twsocket] HttpAppServer, how to alter client.path

2011-01-26 Thread Busai Péter
Ok, it is working now. Just some missing slashes in path caused trouble. Peter I found AddGetAllowedPath in demo project. Is that something to to do with this? What is it doing? Not much comment about it in the source. Peter -- To unsubscribe or change your settings for TWSocket mailing

Re: [twsocket] sending jpg through httpserver

2011-01-26 Thread Busai Péter
Hi Edwin, AnswerStream is just perfect for that. Here is how I send png. It is stored in FpngStream, which is also a TMemoryStream. I dont want it to be destroyed after sent. That is why I create an other memory stream and copy then content. ClientCnx.DocStream := TMemoryStream.Create;

[twsocket] Another unicode issue

2011-01-26 Thread Busai Péter
In HttpAppServer, URLHandler Call Client.AnswerPage(Flags,'','','template.html',nil,['SOMEKEY','A']); The value of SOMEKEY must be one character long. Result rendered in html page: Unsupported TVarRec.VType = vtWideChar Steps to reproduce in demo: Modify TUrlHandlerHomePageHtml to pass just

[twsocket] HtmlPageProducerToString in Delphi XE

2011-01-24 Thread Busai Péter
Hi, I have problem using the above function in unicode compiler Just tried to include a content of a file to servertime document The content of header.html: div id=header Some headerline 1/br Some headerline 2/br Some headerline 3/br /div and the result is: HTMLHEADTITLEICS WebServer

Re: [twsocket] HtmlPageProducerToString in Delphi XE

2011-01-24 Thread Busai Péter
(SessionData.IsAdmin,'','style=display:none;') ],HeaderStream); AnswerPage('','','home.html',nil,[ 'HEADER',UTF8Encode(HeaderStream.DataString) ... Peter 2011.01.24. 18:42 keltezéssel, Busai Péter írta: Hi, I have problem using the above function

Re: [twsocket] HtmlPageProducerToString in Delphi XE

2011-01-24 Thread Busai Péter
One possible solution, I defined a temporary RawByteString and now it returns correct result. I have tested it on DelphiXE and BDS2006. {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} function THttpConnection.HtmlPageProducerToString( const HtmlFile : String;

[twsocket] HttpServer UTF8 problem

2011-01-09 Thread Busai Péter
Hi! I'm trying to port my webapplication to Delphi XE unicode compiler. I have problem to encode accented text in RowDataGetter. In recent nonunicode version I just made conversion like: Tagdata.Add('key', AnsiToUTF8(some_accented_value)) In Delphi XE I tried Tagdata.Add('key',

Re: [twsocket] Using FTPClient in dll

2010-12-01 Thread Busai Péter
2010.12.01. 7:07 keltezéssel, Arno Garrels írta: That's true, you should not call ProcessMessages in a loop like above. NOFORMS and MessageLoop should work. Otherwise show us some more of your code. Again you are right. NOFORMS is the key. The below comment from OverbyteIcsDll1.dpr was a bit

Re: [twsocket] Using FTPClient in dll

2010-11-30 Thread Busai Péter
Solved. Hi! I have to write a dll which downloads some file. I created a project using example OverbyteIcsDll2.dpr as a sample. There are 2 differences. I must put a form inside the dll, which is just a user interface to set up and save connection parameters, but this form is not created at

Re: [twsocket] Using FTPClient in dll

2010-11-30 Thread Busai Péter
Solved. That's great, please describe briefly the cause of the problem and how it was solved, readers of this list might benefit from your findings and save some time. Well, I do not clearly understand the internals, but defining NOFORMS in project option and using while not

Re: [twsocket] Using FTPClient in dll

2010-11-30 Thread Busai Péter
2010.11.30. 20:41 keltezéssel, Arno Garrels írta: Well, I do not clearly understand the internals, but defining NOFORMS in project option and using while not FTPCli.Terminated do FTPCli.ProcessMessages; instead of FTPCli.MessageLoop and quitting with FTPCli.PostQuitMessage

[twsocket] Using FTPClient in dll

2010-11-29 Thread Busai Péter
Hi! I have to write a dll which downloads some file. I created a project using example OverbyteIcsDll2.dpr as a sample. There are 2 differences. I must put a form inside the dll, which is just a user interface to set up and save connection parameters, but this form is not created at the time of

[twsocket] FTPServer access violation

2010-03-14 Thread Busai Péter
Hi ICS team! I'm testing ICS V7 FTP server demo from latest SVN checkout. I use FileZilla client connecting to it and option Use compression for all transfers is on. Exception is thrown in TClientProcessingThread.Execute. Debugger tells me that threads Client.DataStream is nil. However in

[twsocket] THttpSrv slight modification to function ExtractURLEncodedValue

2006-09-12 Thread Busai Péter
Hi! In one of my html forms I had to use html element select multiple name=..., so when the user selects multiple items, we got a datastream like this: var1=value1var1=value2var1=value3... etc. Original function returned only the first value of var1. I know the remark states that it retrieves