[twsocket] SSL Certificates check

2011-05-03 Thread marius gabi
Sorry! Please find attached the log content for Cert.GetRawText.Certificate: Data: Version: 3 (0x2) Serial Number: cb:cf:5d:05:41:b2:33:36 Signature Algorithm: sha256WithRSAEncryption Issuer: C=FR, L=Rennes, ST=Brittany, O=IHE, OU=IHE, CN=Poiseau Eri

[twsocket] Connected when not connected

2011-05-03 Thread Piotr Dałek
Hello. In WSocket's DO_FD_CONNECT procedure, the socket state is set to wsConnected even if the socket has failed to connect (for example, on 10061 error), then the SessionConnected handler is called and after that, check for actual error is performed, where socket is closed when error is not zero

Re: [twsocket] Very Strange PHP Proxying Issue

2011-05-03 Thread Fastream Technologies
Hello, I have found a bug in my code: When Range: variable was present the server response code must be 206 for deciding the entire file size. If it is 200 (in the case of PHP for instance) then the web server content-length is the size for the entire file. This was causing the cache issue. The s

Re: [twsocket] Very Strange PHP Proxying Issue

2011-05-03 Thread Angus Robertson - Magenta Systems Ltd
> Here is a function I > wrote for ICSZlibHigh which takes that into consideration: > > procedure ZlibCompressStreamEx There is already a procedure of exactly that name in OverbyteIcsZlibHigh, although you appeared to have copied an old version or hacked it, so why do need to add it again? Or ar

Re: [twsocket] Very Strange PHP Proxying Issue

2011-05-03 Thread Fastream Technologies
Hello, I have overloaded the function with different parameters as there was already some different overloaded versions of it but as you guessed forgot to mark the changes. Here it is: procedure ZlibCompressStreamEx(InStream, OutStream: TStream; NumLevel: Integer; StreamType : TZStrea

Re: [twsocket] Connected when not connected

2011-05-03 Thread Wilfried Mestdagh
Hi, This is how winsock works. OnSessionConnected is fired with an error, after it OnSessionClosed is fired with or without an error. You should use the events in how to access the component. -- mvg, Wilfried http://www.mestdagh.biz http://www.comfortsoftware.be http://www.expertsoftware.be > -

Re: [twsocket] Connected when not connected

2011-05-03 Thread Piotr Dałek
Hello! > Hi, > This is how winsock works. OnSessionConnected is fired with an error, > after > it OnSessionClosed is fired with or without an error. So having TWSocket's state different from actual state should be considered normal? If so, then I understand that checking for component state is

Re: [twsocket] Connected when not connected

2011-05-03 Thread Francois PIETTE
This is how winsock works. OnSessionConnected is fired with an error, after it OnSessionClosed is fired with or without an error. So having TWSocket's state different from actual state should be considered normal? If so, then I understand that checking for component state is NOT enough to chec

Re: [twsocket] Connected when not connected

2011-05-03 Thread Piotr Dałek
Hello! >>> This is how winsock works. OnSessionConnected is fired with an error, >>> after it OnSessionClosed is fired with or without an error. >> So having TWSocket's state different from actual state should be >> considered >> normal? If so, then I understand that checking for component state

Re: [twsocket] Connected when not connected

2011-05-03 Thread Francois PIETTE
So how should I handle connection errors in a way that makes user aware of error AND not cause any kind of disaster? Catch the error code in OnSessionConnected Yes, indeed. and (using some kind of PostMessage) display actual error message outside OnSessionConnected? If you like it so, no pro

Re: [twsocket] Very Strange PHP Proxying Issue

2011-05-03 Thread Angus Robertson - Magenta Systems Ltd
> I have overloaded the function with different parameters as there > was already some different overloaded versions of it There was one overloaded version, one line long. Your new version unnecessarily duplicates large amounts of code. > but as you guessed forgot to mark the changes. Here

Re: [twsocket] SSL Certificates check

2011-05-03 Thread Arno Garrels
marius gabi wrote: The certificate you posted in your previous messages doesn't use unsupported signature algorithms as I was guessing previously. Since its verify depth is "2" and it seems to be the root certificate, I think the complete chain of the client certificate consists of three certifica

Re: [twsocket] Very Strange PHP Proxying Issue

2011-05-03 Thread Fastream Technologies
Hello, On Tue, May 3, 2011 at 18:11, Angus Robertson - Magenta Systems Ltd < an...@magsys.co.uk> wrote: > > I have overloaded the function with different parameters as there > > was already some different overloaded versions of it > > There was one overloaded version, one line long. > > Your new v

Re: [twsocket] Very Strange PHP Proxying Issue

2011-05-03 Thread Angus Robertson - Magenta Systems Ltd
> The HTTP server is buggy in that it compresses the whole file even > when a content-range is present. So there is a need for this > function yet it had not been recognized. I agree, it's something that was overlooked when compression was implemented and does need to be addressed - when someone

Re: [twsocket] Very Strange PHP Proxying Issue

2011-05-03 Thread Fastream Technologies
Hello, On Tue, May 3, 2011 at 20:35, Angus Robertson - Magenta Systems Ltd < an...@magsys.co.uk> wrote: > > The HTTP server is buggy in that it compresses the whole file even > > when a content-range is present. So there is a need for this > > function yet it had not been recognized. > > I agree,

Re: [twsocket] SSL Certificates check

2011-05-03 Thread Arno Garrels
Arno Garrels wrote: > Next create a CAFile that contains both [1] and [2] > (I think [1] has to be the first, however I always forget the order > in which they must appear, just play). The best way to determine what certificates are sent to the peer requesting certificate verification is to add th

Re: [twsocket] Very Strange PHP Proxying Issue

2011-05-03 Thread Angus Robertson - Magenta Systems Ltd
> I think the other samely named functions can be simplified using > this function instead of having two copies of the same code part. > I will work on it tomorrow. That was what I'm planning, simply adding extra parameters to the existing function. But not this week. Angus -- To unsubscribe

Re: [twsocket] Very Strange PHP Proxying Issue

2011-05-03 Thread Fastream Technologies
Is there any way to set a default value to a parameter in Delphi? In C++ it's like (in .h or .hpp header file) void function(int param = value); so the function can now be called as function() without the requirement of expicit param specification. Regards, SubZero On Tue, May 3, 2011 at 21:28,

Re: [twsocket] Very Strange PHP Proxying Issue

2011-05-03 Thread Francois PIETTE
Is there any way to set a default value to a parameter in Delphi? In C++ it's like (in .h or .hpp header file) void function(int param = value); so the function can now be called as function() without the requirement of expicit param specification. Same in Delphi. -- francois.pie...@overbyte.b

[twsocket] SSL Certificates check

2011-05-03 Thread marius gabi
Thank you for your feedback.In my current scenario the certificate structure is as follows:    Server(my application)  |                  Client Root certificate      -same as-           Root certificate Intermediary CA     -not same as-       Intermediary CA Server Cert           -no