Re: [twsocket] THttpCli and redirected links bug - continued
I experienced the same RequestDone error and asked about it previously. I handled it by checking de StatusCode. On a RequestDone with StatusCode = 0, it's not the final one and more will follow. However, I seem to end up with clients that never generate a RequestDone anymore... That means clients that never finish, which stalls the complete download process. I hope we can start the discussion again. Thanks. --Merijn Btw, I use C++ builder 6 too... Is this a builder-specific bug? On 9/28/05, Bjørnar Nielsen [EMAIL PROTECTED] wrote: First, i have not read the messages you write this follow up to. This is a follow up. I wanted to report what appears to be a related issue to the bug in THttpCli when a link is redirected. It seems that the RequestDone is called twice. This has already been reported and I've implemented a work around in my program. If you get data together with the redirection, mabe it is not a bug that you get requestdone twice? I've discovered another issue in that it doesn't seem that the RcvdStream is being cleared. For example, when a link is requested using THttpCli and it is redirected, there can be garbage at the beginning of RcvdStream. RcvdStream should only contain the document obtained from the redirected link and nothing from the original link that caused the redirection. I am using the latest release version and C++Builder 6. I have reproduced this problem in my application using this link provided by a user: http://net1test.rhmware.com/marketingprimer I have worked around this issue by clearing RcvdStream when the LocationChange event is called using: if (HttpCli-RcvdStream) { HttpCli-RcvdStream-Seek(0,soFromBeginning); } If LocationChange is triggered before you have received all the data from first request, maybe you should clear the stream in requestdone instead,? By the way, I hope the above is sufficient to clear the stream but I'm not sure that it is. If it isn't can anyone state the correct way to clear/reset a steam? I can't find it in the documentation. This only sets the position in the stream, in this case to the start of the stream. Then when you receive data, the data is written from the start of the stream, overwriting previous data if there are any. If you use a TMemoryStream, you can use Clear or SetSize, this will also delete old data. You can also delete the stream and make a new stream. Regards Bjørnar -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] SMTP server adding personalized mail headers
Hello, I need to add in a special SMTP server some headers in special mails, so that users can easy classify them with rules in their email reader. I see that many programs add headers and all are prceided with X-, like: X-Text-Classification: normal X-POPFile-Link: http://mail:8080/jump_to_message?view=4479 Is this normal / best way to do ? If so I think to have domain name in it to be exclusive. Any advice is welcome of course. -- Rgds, Wilfried http://www.mestdagh.biz -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] Thttpsrv and apache
Hello friends, Trying to run slightly modified Webserver program from Francois together with running Apache I have got error 10048 even though I used different ports. I use Apache with IIS in one computer in my work without any problem. Where I am mistaken? Regards Igor -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] BgException when a tcp client application is started by another application
Hello Jack, What is the offending line of code ? I looked into the source and there is no exception starting with 'bgException' ! --- Rgds, Wilfried http://www.mestdagh.biz Wednesday, September 28, 2005, 20:20, Jack wrote: Hello Francois and all, I have a TCP client application that runs just fine by itself, meaning, starts directly from Windows Explorer, or Start Menu. However, when the application is started by another application, I always get this errpr: BgException: EConvertError: Invalid argument to date encode Then the session is closed with ErrCode 0. No matter how it's started (ShellExecute, or CreateProcess, etc.) it always happens. I also tried starting from a .NET application and a Delphi application, same error. Any ideas? -- Best regards, Jack -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] BgException when a tcp client application is started byanother application
BgException: EConvertError: Invalid argument to date encode You pass an invalid argument to some date encode function. This happend in one of your socket event hanlder since it is trapped by BgException. I suggest you use MadExcept to find where it occurs exactly. MadExcept is really an incredibly good product (Free for non commercial use). See http://www.madshi.net/olddlp3.htm. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: Jack [EMAIL PROTECTED] To: twsocket@elists.org Sent: Wednesday, September 28, 2005 8:20 PM Subject: [twsocket] BgException when a tcp client application is started byanother application Hello Francois and all, I have a TCP client application that runs just fine by itself, meaning, starts directly from Windows Explorer, or Start Menu. However, when the application is started by another application, I always get this errpr: BgException: EConvertError: Invalid argument to date encode Then the session is closed with ErrCode 0. No matter how it's started (ShellExecute, or CreateProcess, etc.) it always happens. I also tried starting from a .NET application and a Delphi application, same error. Any ideas? -- Best regards, Jack -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] BgException when a tcp client application is started byanother application
Hello Francois, I'll try that. Any idea why it doesn't happen when it's run from Windows Explorer? -- Best regards, Jack Wednesday, September 28, 2005, 2:36:34 PM, you wrote: BgException: EConvertError: Invalid argument to date encode You pass an invalid argument to some date encode function. This happend in one of your socket event hanlder since it is trapped by BgException. I suggest you use MadExcept to find where it occurs exactly. MadExcept is really an incredibly good product (Free for non commercial use). See http://www.madshi.net/olddlp3.htm. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: Jack [EMAIL PROTECTED] To: twsocket@elists.org Sent: Wednesday, September 28, 2005 8:20 PM Subject: [twsocket] BgException when a tcp client application is started byanother application Hello Francois and all, I have a TCP client application that runs just fine by itself, meaning, starts directly from Windows Explorer, or Start Menu. However, when the application is started by another application, I always get this errpr: BgException: EConvertError: Invalid argument to date encode Then the session is closed with ErrCode 0. No matter how it's started (ShellExecute, or CreateProcess, etc.) it always happens. I also tried starting from a .NET application and a Delphi application, same error. Any ideas? -- Best regards, Jack -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Thttpsrv and apache
I see. When I stop apache, my program runs with port:80 despite what is written in Portedit in your ICS Webserver demo The reason is in nonexistent .INI file. Sorry to bother... Igor On 9/28/05, Francois PIETTE [EMAIL PROTECTED] wrote: Trying to run slightly modified Webserver program from Francois together with running Apache I have got error 10048 even though I used different ports. I use Apache with IIS in one computer in my work without any problem. Where I am mistaken? Obviously, you have wrongly set the port. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] BgException when a tcp client application is started byanother application
Hello Francois, I installed madExcept, and verified it working with a divided by 0 exception I created on purpose. It was caught by madExcept. However, the problem I had in BgException didn't raise any exception that madExcept was able to catch... -- Best regards, Jack Wednesday, September 28, 2005, 2:36:34 PM, you wrote: BgException: EConvertError: Invalid argument to date encode You pass an invalid argument to some date encode function. This happend in one of your socket event hanlder since it is trapped by BgException. I suggest you use MadExcept to find where it occurs exactly. MadExcept is really an incredibly good product (Free for non commercial use). See http://www.madshi.net/olddlp3.htm. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: Jack [EMAIL PROTECTED] To: twsocket@elists.org Sent: Wednesday, September 28, 2005 8:20 PM Subject: [twsocket] BgException when a tcp client application is started byanother application Hello Francois and all, I have a TCP client application that runs just fine by itself, meaning, starts directly from Windows Explorer, or Start Menu. However, when the application is started by another application, I always get this errpr: BgException: EConvertError: Invalid argument to date encode Then the session is closed with ErrCode 0. No matter how it's started (ShellExecute, or CreateProcess, etc.) it always happens. I also tried starting from a .NET application and a Delphi application, same error. Any ideas? -- Best regards, Jack -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] BgException when a tcp client application is started byanother application
Hello Francois, I found the problem by examining all the socket event handlers. You are right. It's a date time conversion function that gets an invalid environment parameter when run from another app. I think the reason madExcept didn't catch it is because BgExcept caught it? Anyway, thanks a lot! -- Best regards, Jack Wednesday, September 28, 2005, 2:36:34 PM, you wrote: BgException: EConvertError: Invalid argument to date encode You pass an invalid argument to some date encode function. This happend in one of your socket event hanlder since it is trapped by BgException. I suggest you use MadExcept to find where it occurs exactly. MadExcept is really an incredibly good product (Free for non commercial use). See http://www.madshi.net/olddlp3.htm. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: Jack [EMAIL PROTECTED] To: twsocket@elists.org Sent: Wednesday, September 28, 2005 8:20 PM Subject: [twsocket] BgException when a tcp client application is started byanother application Hello Francois and all, I have a TCP client application that runs just fine by itself, meaning, starts directly from Windows Explorer, or Start Menu. However, when the application is started by another application, I always get this errpr: BgException: EConvertError: Invalid argument to date encode Then the session is closed with ErrCode 0. No matter how it's started (ShellExecute, or CreateProcess, etc.) it always happens. I also tried starting from a .NET application and a Delphi application, same error. Any ideas? -- Best regards, Jack -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] BgException when a tcp client application is started byanother a
I think the reason madExcept didn't catch it is because BgExcept caught it? I bought MadExcept earlier this week and have been playing with it. It's really designed for applications without any try/except handlers, and misses anything already caught in that way, unless you add the function HandleException into each and every such except handler, including all components. At least that's my experience so far. But the traces it provides can be useful in locating the function causing problems. My main problem is GetHeapStatus which fails with an access violation on too many of our PCs. Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] THttpCli and redirected links bug - continued
I have worked around this issue by clearing RcvdStream when the LocationChange event is called using: if (HttpCli-RcvdStream) { HttpCli-RcvdStream-Seek(0,soFromBeginning); } By the way, I hope the above is sufficient to clear the stream but I'm not sure that it is. If it isn't can anyone state the correct way to clear/reset a steam? I can't find it in the documentation. In that case the best way is calling the CleanupRcvdStream method. It's not accessible so I'm just going to use something like HttpCli-RcvdStream-Size=0; At the moment I'm busy to solve a problem with the SSL version. I keep this message in evidence and I'll look into this problem asap. Thanks. Good luck. :-) Albert -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be