Re: [twsocket] Help with SMTP Settings [new user]

2012-03-13 Thread Arno Garrels
Robert Baker wrote:
> I just downloaded and successfully installed [ Download ICS-V7
> Distribution (October, 2010) ] Support all Delphi 7 to Delphi XE and
> BCB version 2006 to XE  

This is a rather old version, current versions are downloadable 
here: http://wiki.overbyte.be/wiki/index.php/ICS_Download

> 
> I successfully compiled “OverbyteIcsMailHtm1” and set my login
> credentials and port but when I click “Send” I get the following: 
> 
>Connecting to SMTP server...
>Disconnected !
>RequestDone Rq=0 Error=10004
> 
> I am an ATT uVerse subscriber and here are the settings that work
> with Outlook 2007 and Outlook Express [Win 7] which both work from
> this computer:  
> 
>Email Program Settings Field:
>Incoming (POP) inbound.att.net
>Outgoing (SMTP) outbound.att.net
>(requires authentication)
>Incoming mail server: POP3
>Incoming/Outgoing User Name: Full AT&T email address, including
>domain (e.g., t...@att.net, t...@bellsouth.net) Incoming mail port
>#: 995, secure connection (SSL) checked Outgoing mail port # 465,
> secure connection (SSL) checked 
> 

SSL is required however the THtmlSmtpCli component doesn't support
SSL, TSslSmtpCli does. What you need is the TSslHtmlSmtpCli component
from the IPv6/FireMonkey Beta:
http://wiki.overbyte.be/wiki/index.php/ICS_Download

-- 
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

[twsocket] Help with SMTP Settings [new user]

2012-03-13 Thread Robert Baker
I just downloaded and successfully installed [ Download ICS-V7 Distribution 
(October, 2010) ] Support all Delphi 7 to Delphi XE and BCB version 2006 to XE

I successfully compiled “OverbyteIcsMailHtm1” and set my login credentials and 
port but when I click “Send” I get the following:

Connecting to SMTP server...
Disconnected !
RequestDone Rq=0 Error=10004

I am an ATT uVerse subscriber and here are the settings that work with Outlook 
2007 and Outlook Express [Win 7] which both work from this computer:

Email Program Settings Field: 
Incoming (POP) inbound.att.net 
Outgoing (SMTP) outbound.att.net
(requires authentication) 
Incoming mail server: POP3 
Incoming/Outgoing User Name: Full AT&T email address, including domain 
(e.g., t...@att.net, t...@bellsouth.net) 
Incoming mail port #: 995, secure connection (SSL) checked 
Outgoing mail port # 465, secure connection (SSL) checked

Please advise me regarding what I should try or change to get HTML emails 
sending.

Thank You,

Robert Baker
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] Help with stalling ftp client

2012-02-01 Thread Info2004

Arno,

Thanks. I will check that out.

If it persists, I will do as advised and upload the file and post a link.

Regards,

Andy
On 01/02/2012 17:00, Arno Garrels wrote:

Info2004 wrote:

Hi,

Some additional information after hooking up wireshark.

I have attached a csv of the capture.


The list server stripped the attachment, please upload the file
to some webserver and post the URL here.



What it shows me is that I get the 150 from the server,


Now V7.11 comes to my mind, it fixed a bug back in 2010 that
might be the cause of your problem, please try latest ICSv7
from http://wiki.overbyte.be/wiki/index.php/ICS_Download
and let us know whether or not the problem persists.



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Help with stalling ftp client

2012-02-01 Thread Arno Garrels
Info2004 wrote:
>> Hi,
>> 
>> Some additional information after hooking up wireshark.
>> 
>> I have attached a csv of the capture.

The list server stripped the attachment, please upload the file
to some webserver and post the URL here.

>> 
>> What it shows me is that I get the 150 from the server,

Now V7.11 comes to my mind, it fixed a bug back in 2010 that 
might be the cause of your problem, please try latest ICSv7 
from http://wiki.overbyte.be/wiki/index.php/ICS_Download
and let us know whether or not the problem persists.

-- 
Arno Garrels   
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Help with stalling ftp client - attachment contents

2012-02-01 Thread Info2004
Attachment did not work so here it is: (ahh, can't stop thunderbird 
wrapping - sorry)


No. TimeSource  Destination Protocol
Length  Info
190 10.344855   192.168.1.3165.212.180.79   FTP 72  
Request: PASV
191	10.524256	65.212.180.79	192.168.1.31	FTP	117	Response: 227 Entering 
Passive Mode (65,212,180,79,214,237)
192	10.524302	192.168.1.31	65.212.180.79	TCP	66	54818 > ftp [ACK] 
Seq=494 Ack=1663 Win=8 Len=0 TSval=443118091 TSecr=384651593
193	10.525193	192.168.1.31	65.212.180.79	TCP	78	54831 > 55021 [SYN] 
Seq=0 Win=65535 Len=0 MSS=1460 WS=2 TSval=443118091 TSecr=0 SACK_PERM=1
194	10.701375	65.212.180.79	192.168.1.31	TCP	74	55021 > 54831 [SYN, ACK] 
Seq=0 Ack=1 Win=5792 Len=0 MSS=1402 SACK_PERM=1 TSval=384651774 
TSecr=443118091 WS=64
195	10.701407	192.168.1.31	65.212.180.79	TCP	66	54831 > 55021 [ACK] 
Seq=1 Ack=1 Win=66720 Len=0 TSval=443118267 TSecr=384651774
196	10.702119	192.168.1.31	65.212.180.79	FTP	105	Request: STOR 
18012012_1014160_leeEcersley.csv
197	10.880935	65.212.180.79	192.168.1.31	FTP	143	Response: 150 Opening 
ASCII mode data connection for 18012012_1014160_leeEcersley.csv
198	10.880970	192.168.1.31	65.212.180.79	TCP	66	54818 > ftp [ACK] 
Seq=533 Ack=1740 Win=66642 Len=0 TSval=443118445 TSecr=384651954

199 10.881595   192.168.1.3165.212.180.79   FTP-DATA157 
FTP Data: 91 bytes
200	10.881754	192.168.1.31	65.212.180.79	TCP	66	54831 > 55021 [FIN, ACK] 
Seq=92 Ack=1 Win=66720 Len=0 TSval=443118445 TSecr=384651774
201	11.062593	65.212.180.79	192.168.1.31	TCP	66	55021 > 54831 [ACK] 
Seq=1 Ack=92 Win=5824 Len=0 TSval=384652133 TSecr=443118445
202	11.062625	192.168.1.31	65.212.180.79	TCP	66	54831 > 55021 [FIN, ACK] 
Seq=92 Ack=1 Win=66720 Len=0 TSval=443118625 TSecr=384652133
203	11.063438	65.212.180.79	192.168.1.31	TCP	66	55021 > 54831 [FIN, ACK] 
Seq=1 Ack=93 Win=5824 Len=0 TSval=384652136 TSecr=443118445
204	11.063465	192.168.1.31	65.212.180.79	TCP	66	54831 > 55021 [ACK] 
Seq=93 Ack=2 Win=66720 Len=0 TSval=443118625 TSecr=384652136
205	11.064379	65.212.180.79	192.168.1.31	FTP	89	Response: 226 Transfer 
complete
206	11.064404	192.168.1.31	65.212.180.79	TCP	66	54818 > ftp [ACK] 
Seq=533 Ack=1763 Win=66696 Len=0 TSval=443118626 TSecr=384652137

207 11.142144   192.168.1.3165.212.180.79   FTP 72  
Request: PASV
208	11.316388	65.212.180.79	192.168.1.31	FTP	115	Response: 227 Entering 
Passive Mode (65,212,180,79,202,2)
209	11.316422	192.168.1.31	65.212.180.79	TCP	66	54818 > ftp [ACK] 
Seq=539 Ack=1812 Win=66670 Len=0 TSval=443118878 TSecr=384652389
210	12.820295	192.168.1.31	65.212.180.79	TCP	78	54832 > 51714 [SYN] 
Seq=0 Win=65535 Len=0 MSS=1460 WS=2 TSval=443120374 TSecr=0 SACK_PERM=1
211	13.010071	65.212.180.79	192.168.1.31	TCP	74	51714 > 54832 [SYN, ACK] 
Seq=0 Ack=1 Win=5792 Len=0 MSS=1402 SACK_PERM=1 TSval=384654080 
TSecr=443120374 WS=64
212	13.010112	192.168.1.31	65.212.180.79	TCP	66	54832 > 51714 [ACK] 
Seq=1 Ack=1 Win=66720 Len=0 TSval=443120563 TSecr=384654080
213	13.010847	192.168.1.31	65.212.180.79	FTP	105	Request: STOR 
18012012_1014360_leeEcersley.csv
214	13.191201	65.212.180.79	192.168.1.31	FTP	143	Response: 150 Opening 
ASCII mode data connection for 18012012_1014360_leeEcersley.csv
215	13.191241	192.168.1.31	65.212.180.79	TCP	66	54818 > ftp [ACK] 
Seq=578 Ack=1889 Win=66642 Len=0 TSval=443120743 TSecr=384654264


On 01/02/2012 15:00, Info2004 wrote:

Hi,

Some additional information after hooking up wireshark.

I have attached a csv of the capture.

What it shows me is that I get the 150 from the server, I then send an
ACK, but I don't send the FTP-DATA.

Then of course, I don't see the request done event, because I have not
sent the data.

For the ACK to go out after the 150 response I am assuming that the ftp
client has seen the response, and sent the ack. Or am I mistaken? Is
this a lower level interaction? (in winsock somewhere)

Why would I not send the data - is my question really?

I don't have any Application.ProcessMessages loops in my application -
apart from a start up splash screen, and an application shut down loop
waiting for a thread to close down. Neither are active when my ftp stalls.

The thread I create has nothing (intentionally) to do with the ftp
client. It monitors a usb serial port, downloads serial data and creates
files on the file system. This thread is not downloading serial data and
creating files, as there is no device connected.

I do now detect the stall with a timer, but don't currently restart -
just display a message so that the user can retry.

I am logging all RequestDone events, and nothing is reported when I
stall. I have attached the csv that shows the last good transfer, then
the stall. If an alternative format is preferred, just ask.

Ideas?

Thanks,

Andy
On 31/01/2012 15:43, Info2004 wrote:

Hi,

I have been using the ftp client component for a couple of years now
without a hitch. Until recently. The version is 7.09.

I have in

Re: [twsocket] Help with stalling ftp client

2012-02-01 Thread Info2004

Hi,

Some additional information after hooking up wireshark.

I have attached a csv of the capture.

What it shows me is that I get the 150 from the server, I then send an 
ACK, but I don't send the FTP-DATA.


Then of course, I don't see the request done event, because I have not 
sent the data.


For the ACK to go out after the 150 response I am assuming that the ftp 
client has seen the response, and sent the ack. Or am I mistaken? Is 
this a lower level interaction? (in winsock somewhere)


Why would I not send the data - is my question really?

I don't have any Application.ProcessMessages loops in my application - 
apart from a start up splash screen, and an application shut down loop 
waiting for a thread to close down. Neither are active when my ftp stalls.


The thread I create has nothing (intentionally) to do with the ftp 
client. It monitors a usb serial port, downloads serial data and creates 
files on the file system. This thread is not downloading serial data and 
creating files, as there is no device connected.


I do now detect the stall with a timer, but don't currently restart - 
just display a message so that the user can retry.


I am logging all RequestDone events, and nothing is reported when I 
stall. I have attached the csv that shows the last good transfer, then 
the stall. If an alternative format is preferred, just ask.


Ideas?

Thanks,

Andy
On 31/01/2012 15:43, Info2004 wrote:

Hi,

I have been using the ftp client component for a couple of years now
without a hitch. Until recently. The version is 7.09.

I have in the main thread a timer that runs a state machine to control
logging in and sending of the files. But recently, the state machine
stalls and times out. I have logged the debug from the component, and
you can see two successful sends, and the last one fails.

In the failed send, the STOR is issued, but the 150 Opening ASCII ...
does not happen. This is as a result of calling PutAsync on the component.

Now before I dust off wireshark, does anybody know what could cause the
150 after the STOR command?



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] Help with stalling ftp client

2012-01-31 Thread Arno Garrels
Brian Culverwell wrote:
> probably your backend ftp server has been changed to 'binary' type -
> and when receiving your request to STOR the .csv file - it is issuing
> a type A to change the mode to ASCII

A server doesn't issue commands, regardless of which type is active
the upload should basically work. Setting the binary type is only
important with non-Windows servers and not setting it will just 
corrupt non-text data.  

-- 
Arno Garrels   

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Help with stalling ftp client

2012-01-31 Thread Arno Garrels
Info2004 wrote:
> On 31/01/2012 17:41, Arno Garrels wrote:
>> 
>> I guess the server did not send a response to the STOR
>> request after the client successfully established the data
>> connection. Since this is async mode your application
>> should have detected and handled a request timeout.
>> 
> Arno,
> 
> What is the correct way to handle this scenario?

Use a timer and reset some timeout value whenever data is sent
and received, on timeout I'd abort the connection and retry. 

> 
> Can I issue another PutAsync, or will I need to close the connection
> and start again?

I would abort and start a new fresh session after some wait time
until a MaxRetry value is reached, increasing the wait before each
retry.

-- 
Arno Garrels



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Help with stalling ftp client

2012-01-31 Thread Info2004

OK.

Thanks.

On 31/01/2012 21:46, Brian Culverwell wrote:

before each STOR

On Wed, Feb 1, 2012 at 6:27 AM, Info2004  wrote:


On 31/01/2012 19:05, Brian Culverwell wrote:


probably your backend ftp server has been changed to 'binary' type - and
when receiving your request to STOR the .csv file - it is issuing a type A
to change the mode to ASCII

You could force the Type A before issuing your STOR.



Brian,

Do you mean to set ascii initially after logging on, or before each STOR
(PutAsync) ?

Regards,

Andy

--
To unsubscribe or change your settings for TWSocket mailing list
please goto 
http://lists.elists.org/cgi-**bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Help with stalling ftp client

2012-01-31 Thread Brian Culverwell
before each STOR

On Wed, Feb 1, 2012 at 6:27 AM, Info2004  wrote:

> On 31/01/2012 19:05, Brian Culverwell wrote:
>
>> probably your backend ftp server has been changed to 'binary' type - and
>> when receiving your request to STOR the .csv file - it is issuing a type A
>> to change the mode to ASCII
>>
>> You could force the Type A before issuing your STOR.
>>
>>
> Brian,
>
> Do you mean to set ascii initially after logging on, or before each STOR
> (PutAsync) ?
>
> Regards,
>
> Andy
>
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto 
> http://lists.elists.org/cgi-**bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Help with stalling ftp client

2012-01-31 Thread Info2004

On 31/01/2012 19:05, Brian Culverwell wrote:

probably your backend ftp server has been changed to 'binary' type - and
when receiving your request to STOR the .csv file - it is issuing a type A
to change the mode to ASCII

You could force the Type A before issuing your STOR.



Brian,

Do you mean to set ascii initially after logging on, or before each STOR 
(PutAsync) ?


Regards,

Andy

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Help with stalling ftp client

2012-01-31 Thread Info2004

On 31/01/2012 17:41, Arno Garrels wrote:


I guess the server did not send a response to the STOR
request after the client successfully established the data
connection. Since this is async mode your application
should have detected and handled a request timeout.


Arno,

What is the correct way to handle this scenario?

Can I issue another PutAsync, or will I need to close the connection and 
start again?


Regards,

Andy
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Help with stalling ftp client

2012-01-31 Thread Brian Culverwell
probably your backend ftp server has been changed to 'binary' type - and
when receiving your request to STOR the .csv file - it is issuing a type A
to change the mode to ASCII

You could force the Type A before issuing your STOR.

Regards
Brian

On Wed, Feb 1, 2012 at 2:43 AM, Info2004  wrote:

> Hi,
>
> I have been using the ftp client component for a couple of years now
> without a hitch. Until recently. The version is 7.09.
>
> I have in the main thread a timer that runs a state machine to control
> logging in and sending of the files. But recently, the state machine stalls
> and times out. I have logged the debug from the component, and you can see
> two successful sends, and the last one fails.
>
> In the failed send, the STOR is issued, but the 150 Opening ASCII ... does
> not happen. This is as a result of calling PutAsync on the component.
>
> Now before I dust off wireshark, does anybody know what could cause the
> 150 after the STOR command?
>
> 
> Sending to server: 17012012_1315390_leeEcersley.**csv
> > PASV
> < 227 Entering Passive Mode (65,212,180,79,135,10)
> ! Upload Size 91
> > STOR 17012012_1315390_leeEcersley.**csv
> < 150 Opening ASCII mode data connection for 17012012_1315390_leeEcersley.
> **csv
> < 226 Transfer complete
> ! 91bytes received/sent in 360 milliseconds
> Request 18 Done.
> StatusCode = 226
> LastResponse was : '226 Transfer complete'
> Sending to server: 17012012_1317030_leeEcersley.**csv
> > PASV
> < 227 Entering Passive Mode (65,212,180,79,156,230)
> ! Upload Size 91
> > STOR 17012012_1317030_leeEcersley.**csv
> < 150 Opening ASCII mode data connection for 17012012_1317030_leeEcersley.
> **csv
> < 226 Transfer complete
> ! 91bytes received/sent in 360 milliseconds
> Request 18 Done.
> StatusCode = 226
> LastResponse was : '226 Transfer complete'
> Sending to server: 17012012_1319010_leeEcersley.**csv
> > PASV
> < 227 Entering Passive Mode (65,212,180,79,238,1)
> ! Upload Size 91
> > STOR 17012012_1319010_leeEcersley.**csv
> 
>
> Thanks,
>
> Andy
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto 
> http://lists.elists.org/cgi-**bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Help with stalling ftp client

2012-01-31 Thread Arno Garrels
Info2004 wrote:
>> PASV
> < 227 Entering Passive Mode (65,212,180,79,238,1)
> ! Upload Size 91
>> STOR 17012012_1319010_leeEcersley.csv
> 

I guess the server did not send a response to the STOR 
request after the client successfully established the data
connection. Since this is async mode your application
should have detected and handled a request timeout.

-- 
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Help with stalling ftp client

2012-01-31 Thread Info2004

Hi,

I have been using the ftp client component for a couple of years now 
without a hitch. Until recently. The version is 7.09.


I have in the main thread a timer that runs a state machine to control 
logging in and sending of the files. But recently, the state machine 
stalls and times out. I have logged the debug from the component, and 
you can see two successful sends, and the last one fails.


In the failed send, the STOR is issued, but the 150 Opening ASCII ... 
does not happen. This is as a result of calling PutAsync on the component.


Now before I dust off wireshark, does anybody know what could cause the 
150 after the STOR command?



Sending to server: 17012012_1315390_leeEcersley.csv
> PASV
< 227 Entering Passive Mode (65,212,180,79,135,10)
! Upload Size 91
> STOR 17012012_1315390_leeEcersley.csv
< 150 Opening ASCII mode data connection for 
17012012_1315390_leeEcersley.csv

< 226 Transfer complete
! 91bytes received/sent in 360 milliseconds
Request 18 Done.
StatusCode = 226
LastResponse was : '226 Transfer complete'
Sending to server: 17012012_1317030_leeEcersley.csv
> PASV
< 227 Entering Passive Mode (65,212,180,79,156,230)
! Upload Size 91
> STOR 17012012_1317030_leeEcersley.csv
< 150 Opening ASCII mode data connection for 
17012012_1317030_leeEcersley.csv

< 226 Transfer complete
! 91bytes received/sent in 360 milliseconds
Request 18 Done.
StatusCode = 226
LastResponse was : '226 Transfer complete'
Sending to server: 17012012_1319010_leeEcersley.csv
> PASV
< 227 Entering Passive Mode (65,212,180,79,238,1)
! Upload Size 91
> STOR 17012012_1319010_leeEcersley.csv


Thanks,

Andy
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Help needed with TWSocket descendant with backgroundthread message loop

2012-01-30 Thread Arno Garrels
Robert,

You have to check for Msg.hwnd = 0 otherwise your custom message 
IDs will probably conflict which TWSocket's own messages like:

while GetMessage(MsgRec, 0, 0, 0) do
begin
  if MsgRec.hwnd = 0 then {<== ** VERY IMPORTANT ** }
  begin
Handle messages posted to this thread through PostThreadMessage()
  end
  else begin  
// Other messages posted to some window handle in this thread // 
TranslateMessage(MsgRec);
DispatchMessage(MsgRec);   
  end;

Also if you overrode TWSocket's WndProc method to handle own, custom
messages posted to TWSocket's window handle those custom messages 
MUST be allocated by overriding three more methods in ICSv6+, 
here's an example:

{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
function TCustomFtpCli.MsgHandlersCount : Integer;
begin
Result := 3 + inherited MsgHandlersCount;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TCustomFtpCli.AllocateMsgHandlers;
begin
inherited AllocateMsgHandlers;
FMsg_WM_FTP_REQUEST_DONE := FWndHandler.AllocateMsgHandler(Self);
FMsg_WM_FTP_SENDDATA := FWndHandler.AllocateMsgHandler(Self);
FMsg_WM_FTP_CLOSEDOWN:= FWndHandler.AllocateMsgHandler(Self);
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TCustomFtpCli.FreeMsgHandlers;
begin
if Assigned(FWndHandler) then begin
FWndHandler.UnregisterMessage(FMsg_WM_FTP_REQUEST_DONE);
FWndHandler.UnregisterMessage(FMsg_WM_FTP_SENDDATA);
FWndHandler.UnregisterMessage(FMsg_WM_FTP_CLOSEDOWN);
end;
inherited FreeMsgHandlers;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}

BTW: Method PutDataInSendBuffer() actually _is thread-safe, so there is
no need to copy data a second time to a custom buffer.

-- 
Arno Garrels

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Help needed with TWSocket descendant with background thread message loop

2012-01-29 Thread robertoschler
I have a TWSocket descendant called TWSocketClientDeluxe.  It does its work on 
a background thread.  I have confirmed that this is the case by setting 
breakpoints on various events and inspecting the Threads window to make sure it 
is not on the main thread.  It creates its own client thread and its 
Multithreaded property is TRUE.

I recently changed my Send() method override to post buffers to the client 
thread so that the actual Send() takes place on the worker thread and not on 
the thread that calls TWSocketClientDeluxe.Send().  To facilitate this, the 
custom message loop I created to replace the base class method has custom 
windows messages for executing certain relevant requests and for processing the 
Send() data requests posted by TWSocketClientDeluxe.Send().  The client thread 
message loop then takes those buffers and calls a method I created called 
BgSend().  That method simply calls the base class Send() method (inherited 
Send()).  I am having various problems so I am posting the code I wrote for the 
client thread's custom message loop to see if any of you see any problems with 
it.  It's a little lengthy so my apologies in advance.

The reason I have taken such extreme measures like moving to a background 
thread and decoupling the Send() operation is to avoid any thread blocking 
issues as much as I can.  My application is the middleman between two sockets 
that cooperate in a multiple real-time audio streams.  Therefore, I have to 
grab the buffer from one socket and send it out the other as quickly as 
possible.  Hence the extreme measures.  Note, the interface object retrieved 
from the MsgRec was already _AddRef'd an extra time before it was posted to 
make sure it did not destroy prematurely when recovered by the custom message 
loop.

Here's the code, hopefully the formatting doesn't fall apart in your E-mail 
reader.  Please comment on anything that is wrong or might cause instabilities 
or problems:

-- Custom Message Loop For Socket Client Thread 


while GetMessage(MsgRec, 0, 0, 0) do
begin
TranslateMessage(MsgRec);

// Is it a request to execute a custom background thread request?
if MsgRec.message = WM_BG_CUSTOM_SOCKET_REQUEST then
begin
// ATI: 1-10-2012: Custom background thread request.
//
// If our owner socket is a TWSocketClientDeluxe instance and
//  we have a custom background request event handler, then
//  call it now.
if WSocket is TWSocketClientDeluxe then
begin
theSockCliDeluxe := TWSocketClientDeluxe(WSocket);

if Assigned(theSockCliDeluxe.OnBgCustomRequestProc) then
theSockCliDeluxe.OnBgCustomRequestProc(MsgRec);
end; // if WSocket is TWSocketClientDeluxe then
end
// Is it a request to reconnect with the same settings as the
//  last connect (current settings)?
else if MsgRec.message = WM_BG_SOCKET_RECONNECT then
begin
// If we are not "closed" then this is an error.
if not (WSocket.State = wsClosed) then
raise Exception.Create('(TClientThread.Execute) A reconnect request 
was received when our socket was not in the "closed" state.  Socket name: ' + 
WSocket.Name);

// --- RECONNECT ---

// Re-connect.
WSocket.Connect;
end // if (GAUNTLET) then
else if MsgRec.message = WM_BG_SOCKET_SEND_REQUEST then
begin
// -- SEND DATA REQUEST --

// Recover the send data request interface.
intf := nil;
P := Pointer(MsgRec.lParam);

if not Assigned(P) then
raise Exception.Create('(TClientThread.Execute) Long parameter was 
not assigned, received pointer invalid while recovering the 
IPostBufferToCollection interface.');

Move(P, intf, sizeof(intf));

if not Assigned(intf) then
raise Exception.Create('(TClientThread.Execute) Received an 
unassigned interface object.');

if not Supports(intf, IClientSocketSendDataRequest, 
intfCliSockSendDataReq) then
raise Exception.Create('(TClientThread.Execute) Interface object 
received is not a IClientSocketSendDataRequest interface.');

if not Assigned(intfCliSockSendDataReq.data) then
raise Exception.Create('(TClientThread.Execute) The send data 
request has an unassigned data pointer.');

if intfCliSockSendDataReq.dataLen <= 0 then
raise Exception.Create('(TClientThread.Execute) The send data 
request''s buffer length is less than or equal to 0.');

// Send the data now but use the background send method  that
//  calls the inherited Send() method directly or we
//  will create a recursive self-posting situation.
with WSocket as TWSocketClientDeluxe do
BgSend(intfCliSockSendDataReq.data, intfCliSockSendDataReq.dataLen);

// Release the interface variables we us

Re: [twsocket] Help - THttpServer and PUT

2012-01-24 Thread Arno Garrels
Arno Garrels wrote:
> Kamil Pavel Skála wrote:
>> Hi,
>> i test the ics komponent and creating RESTful service, but have
>> problem with implementing unimplemented
>> request PUT. I handled PUT and DELETE in the OnUnknownRequest, bud
>> where is data sending by client via PUT method?
>> 
>> Any samples or documentation?
> 
> PUT method is very similar to POST
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
> The OverbyteIcsWebServ demo shows how to handle POST
> requests.

It's likely most simple to just override 
THttpConnection.TriggerUnknownRequestMethod and then handle 
PUT requests in the OnPostDocument and OnPostedData events as well.

{code}
procedure TMyHttpConnection.TriggerUnknownRequestMethod(var Handled: Boolean);
begin
  if Method = 'PUT' then
  begin
ProcessPost;
Handled := True;
  end
  else
inherited;
end;
{code}


> 
> --
> Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Help - THttpServer and PUT

2012-01-24 Thread Arno Garrels
Kamil Pavel Skála wrote:
> Hi,
> i test the ics komponent and creating RESTful service, but have
> problem with implementing unimplemented 
> request PUT. I handled PUT and DELETE in the OnUnknownRequest, bud
> where is data sending by client via PUT method? 
> 
> Any samples or documentation?

PUT method is very similar to POST
http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
The OverbyteIcsWebServ demo shows how to handle POST
requests.

-- 
Arno Garrels  


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Help - THttpServer and PUT

2012-01-24 Thread Kamil Pavel Skála
Hi,
i test the ics komponent and creating RESTful service, but have problem with 
implementing unimplemented
request PUT. I handled PUT and DELETE in the OnUnknownRequest, bud where is 
data sending by client via PUT method?

Any samples or documentation?

I thank all

Best regards, Kamil.
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Help with TUrlHandler.AnswerPage (problem with Tags argument)

2011-10-11 Thread David Esperalta
Hi to all!

First of all, thanks for the ICS components, a really nice
collection of components to use.

I have a problem when try to use the TUrlHandler.Answerpage
method. In fact, I have problems when triying to use "dinamyc"
tags".

I try to explain. Supose I write something like this:

---

AnswerPage( '', '', '/template.html', nil, [ 'Name', 'Jhon Doe' ] );

---

Everything is OK, the template.html file is served as expected,
with the "Name" tag appropiately replaced with "Jhon Doe"
value.

Now supose I write something like this:

--

var
  openArray : array of TVarRec;

begin
  SetLength( openArray, 2 );

  openArray[ 0 ].VType := vtAnsiString;
  openArray[ 0 ].VAnsiString := PChar( 'Name' );

  openArray[ 1 ].VType := vtAnsiString;
  openArray[ 1 ].VAnsiString := PChar( 'Jhon Doe' );

  AnswerPage( '', '', '/template.html', nil, openArray );

--

Again everything is OK and work fine. But... supose now
I dont know what tags need to be added to the template.

So, I tried something like this:

---

var
  tags : array of TVarRec;

begin

{...}

if tagsCount <> -1 then
begin
  SetLength( tags, tagsCount );
  for i := 0 to tagsCount - 1 do
  begin
s := GetTheValueOfS( theTags, i ); // Just for example

tags[ i ].VType := vtAnsiString;
tags[ i ].VAnsiString := PChar( s );
  end;
end;

AnswerPage( '', '', '/template.html', nil, tags );

---

So this not work at all. My idea (and need) is to fill a
"array of TVarRec", and then pass to the "AnswerPage"
method, but, did not work.

The Array is OK, that is, I can iterate with their values
and everything is OK, but, debugging the project I can
see that finally something is wrong, the values (almost
someone) are lost.

I dream with a solution. Or for a possible "AnswerPage"
overloading method that admit a "TStrings" for the Tags,
instead of a "array of const".

This last work like a charm, except then need to fill the
array using a "TPVarRec" dinamically, as I explain above.

So anyone can help me? Any idea, suggestion or comment?

If anything is not clear (sorry my poor english) please, tell
me and I try to explain my problem again.

Thanks very much in advance.

Cheers!

-- 

David Esperalta*
Freelance Software Developer
**Email:* davidespera...@gmail.com
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] help on httpcli post

2010-10-12 Thread Xavier Mor-Mur

 Hi RTT

Thanks for sample. I play with it in few minutes.

I read many off post even when are out of my programing knowledge, give 
me ideas how to do better my programs.

Thanks again to all ICS folks.

Xavi

Al 12/10/2010 18:55, En/na RTT ha escrit:


Here is a sample that work.

Get the 'multipart/form-data' encode tstream class code from this unit:
http://read.pudn.com/downloads116/sourcecode/internet/495621/Gz235_200671623235689/cn700_del549790557/IndyMultipartFormData/MsMultiPartFormData.pas__.htm 



Start a new Delphi application, and in the main form place:

1 THttpCli,
1 TButton,
1 TMemo
1 TOpenDialog

   function GetMimeType(fileName: string): string;
   var reg: tregistry;
  ext: string;
   begin
  result := 'application/unknown';
  ext := lowercase(extractFileExt(filename));
  reg := tregistry.Create;
  try
reg.RootKey := HKEY_CLASSES_ROOT;
if reg.OpenKey(ext, false) and reg.ValueExists('Content Type') 
then

  result := reg.ReadString('Content Type')
  finally
reg.Free;
  end;
   end;

   procedure TForm1.UploadFile(url, Filename: string);
   var
  MultiPartFormDataStream: TMsMultiPartFormDataStream;
  fStream: TFileStream;
   begin
  fStream := TFileStream.Create(Filename, fmOpenRead);
  MultiPartFormDataStream := TMsMultiPartFormDataStream.create;
  MultiPartFormDataStream.AddFile('fileupload1',
   ExtractFileName(filename), GetMimeType(Filename), fstream);
  fStream.free;
  //there is a bug in the HFS code so we need to add a dummy field 
here

  MultiPartFormDataStream.AddFormField('fileupload2', '');
  MultiPartFormDataStream.PrepareStreamForDispatch;
  MultiPartFormDataStream.Position := 0;
  Memo1.Lines.LoadFromStream(MultiPartFormDataStream);
  MultiPartFormDataStream.Position := 0;
  HttpCli1.ContentTypePost := 'multipart/form-data;
   boundary='+MultiPartFormDataStream.Boundary;
  HttpCli1.SendStream := MultiPartFormDataStream;
  HttpCli1.URL := url;
  HttpCli1.Post;
  HttpCli1.SendStream.free;
   end;

   procedure TForm1.Button1Click(Sender: TObject);
   begin
  if OpenDialog1.Execute then
UploadFile('http://81.184.21.22:100/hfs/', OpenDialog1.FileName);
   end;

I have just now upload a file with this code to your HFS server.

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.862 / Base de datos de virus: 271.1.1/3192 - Fecha de la version: 
10/12/10 08:34:00



--
Xavier Mor-Mur

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] help on httpcli post

2010-10-12 Thread RTT


Here is a sample that work.

Get the 'multipart/form-data' encode tstream class code from this unit:
http://read.pudn.com/downloads116/sourcecode/internet/495621/Gz235_200671623235689/cn700_del549790557/IndyMultipartFormData/MsMultiPartFormData.pas__.htm

Start a new Delphi application, and in the main form place:

1 THttpCli,
1 TButton,
1 TMemo
1 TOpenDialog

   function GetMimeType(fileName: string): string;
   var reg: tregistry;
  ext: string;
   begin
  result := 'application/unknown';
  ext := lowercase(extractFileExt(filename));
  reg := tregistry.Create;
  try
reg.RootKey := HKEY_CLASSES_ROOT;
if reg.OpenKey(ext, false) and reg.ValueExists('Content Type') then
  result := reg.ReadString('Content Type')
  finally
reg.Free;
  end;
   end;

   procedure TForm1.UploadFile(url, Filename: string);
   var
  MultiPartFormDataStream: TMsMultiPartFormDataStream;
  fStream: TFileStream;
   begin
  fStream := TFileStream.Create(Filename, fmOpenRead);
  MultiPartFormDataStream := TMsMultiPartFormDataStream.create;
  MultiPartFormDataStream.AddFile('fileupload1',
   ExtractFileName(filename), GetMimeType(Filename), fstream);
  fStream.free;
  //there is a bug in the HFS code so we need to add a dummy field here
  MultiPartFormDataStream.AddFormField('fileupload2', '');
  MultiPartFormDataStream.PrepareStreamForDispatch;
  MultiPartFormDataStream.Position := 0;
  Memo1.Lines.LoadFromStream(MultiPartFormDataStream);
  MultiPartFormDataStream.Position := 0;
  HttpCli1.ContentTypePost := 'multipart/form-data;
   boundary='+MultiPartFormDataStream.Boundary;
  HttpCli1.SendStream := MultiPartFormDataStream;
  HttpCli1.URL := url;
  HttpCli1.Post;
  HttpCli1.SendStream.free;
   end;

   procedure TForm1.Button1Click(Sender: TObject);
   begin
  if OpenDialog1.Execute then
UploadFile('http://81.184.21.22:100/hfs/', OpenDialog1.FileName);
   end;

I have just now upload a file with this code to your HFS server.

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] help on httpcli post

2010-10-12 Thread Xavier Mor-Mur

 Thanks Francois and Frans
I will take look.
May need is the most basic use of http get/post.
Sporadically and need send files to servers for which I don't have any 
support/control.
Some of them have ftp support, no problem with ICS, but troubles I come 
with http protocol.

I'm a permanent beginner programmer.
Many thanks for all
Xavi

Al 12/10/2010 14:44, En/na Francois PIETTE ha escrit:

As I know HFS have a some kind of code but I don't know how to call it
from client.
Open on your navigator "http:// 81.184.21.22 :100/hfs/" and will see 
a very

easy web page with list of files with two buttons "UPLOAD" and "LOGIN".
Upload button allow select up to 10 files and then upload it using 
"UPLOAD

FILES" button.
HFS is one exe and one config file, don't need install and all work is
done internally.


The browser will interpret the JavaScript which is behind the form and
post/get the files to the website.
I suggest you use WireShark to see what URL your browser use to post the
files. It is usually much easier to see what the browser do than 
trying to
understand complex JavaScript which is probably written so that you 
cannot

easily reverse engineer it.


Any idea is welcome, in the mean time will try with options of HFS.


I don't know your requirements, but why don't you write your own server
program using ICS component ? You have everything you need there.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.862 / Base de datos de virus: 271.1.1/3192 - Fecha de la version: 
10/12/10 08:34:00



--
Xavier Mor-Mur

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] help on httpcli post

2010-10-12 Thread Francois PIETTE

As I know HFS have a some kind of code but I don't know how to call it
from client.
Open on your navigator "http:// 81.184.21.22 :100/hfs/" and will see a 
very

easy web page with list of files with two buttons "UPLOAD" and "LOGIN".
Upload button allow select up to 10 files and then upload it using "UPLOAD
FILES" button.
HFS is one exe and one config file, don't need install and all work is
done internally.


The browser will interpret the JavaScript which is behind the form and
post/get the files to the website.
I suggest you use WireShark to see what URL your browser use to post the
files. It is usually much easier to see what the browser do than trying to
understand complex JavaScript which is probably written so that you cannot
easily reverse engineer it.


Any idea is welcome, in the mean time will try with options of HFS.


I don't know your requirements, but why don't you write your own server
program using ICS component ? You have everything you need there.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] help on httpcli post

2010-10-12 Thread Frans van Daalen

Hi Xavier,

Francois is trying to tell you that you need to read some more about the 
difference between post and get and the way those work in a form.


Try the following

Host: 81.184.21.22:100
url = POST /hfs/.
data = 
fileupload1=C%3A%5CDocuments+and+Settings%5C%5CDesktop%5Ctest.txt&upbtn=Upload+files


this will upload a file (test.txt) from the desktop of user XX to the 
server



- Original Message - 
From: "Xavier Mor-Mur" 

To: "ICS support mailing" 
Sent: Tuesday, October 12, 2010 1:23 PM
Subject: Re: [twsocket] help on httpcli post



 Hello Francois

As I know HFS have a some kind of code but I don't know how to call it 
from client.
Open on your navigator "http://81.184.21.22:100/hfs/"; and will see a very 
easy web page with list of files with two buttons "UPLOAD" and "LOGIN". 
Upload button allow select up to 10 files and then upload it using "UPLOAD 
FILES" button.
HFS is one exe and one config file, don't need install and all work is 
done internally.


I tried some demos using http post and only found one which works.
Demo which works is "submitfile" from 
http://www.clevercomponents.com/products/inetsuite/demos/submitfile.asp
I don't know it does but it works, but other http demos from same site 
using post don't work.


Any idea is welcome, in the mean time will try with options of HFS.

Regards
Xavi

Al 12/10/2010 09:48, En/na Francois PIETTE ha escrit:
I try to include http get and post to my program and doing tests on 
OverbyteIcshttptst demo.

I get function GET work but not with function POST.

I configured at home free "HFS - HTTP File Server" from 
http://www.rejetto.com/hfs/

When running demo I set
URL = http://81.184.21.22:100/hfs/c-obfuscado.txt
Data = C:\Mis documentos\c-obfuscado.txt
Button GET works and how text file in panel
Button POST give sequence events bellow.
POST Failed !
StatusCode   = 404
ReasonPhrase = Request aborted on timeout

Sure I missing to do something but I don't know what.


You cannot do a post to a document link unless there is a script (or 
whatever code is required) at server side to handle the post.


I suggest you first try posting using your favorite internet navigator to 
validate the webserver configuration, then you may start doing the same 
with the component.


Usually, the webserver has an HTML form with some fields (including file 
field) and a submit button. behing the submit button, you have the URL 
used to "post" the form. This is the URL you have to use with the 
component.


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.862 / Base de datos de virus: 271.1.1/3192 - Fecha de la 
version: 10/12/10 08:34:00




--
Xavier Mor-Mur

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be






--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] help on httpcli post

2010-10-12 Thread Xavier Mor-Mur

 Hello Francois

As I know HFS have a some kind of code but I don't know how to call it 
from client.
Open on your navigator "http://81.184.21.22:100/hfs/"; and will see a 
very easy web page with list of files with two buttons "UPLOAD" and 
"LOGIN". Upload button allow select up to 10 files and then upload it 
using "UPLOAD FILES" button.
HFS is one exe and one config file, don't need install and all work is 
done internally.


I tried some demos using http post and only found one which works.
Demo which works is "submitfile" from 
http://www.clevercomponents.com/products/inetsuite/demos/submitfile.asp
I don't know it does but it works, but other http demos from same site 
using post don't work.


Any idea is welcome, in the mean time will try with options of HFS.

Regards
Xavi

Al 12/10/2010 09:48, En/na Francois PIETTE ha escrit:
I try to include http get and post to my program and doing tests on 
OverbyteIcshttptst demo.

I get function GET work but not with function POST.

I configured at home free "HFS - HTTP File Server" from 
http://www.rejetto.com/hfs/

When running demo I set
URL = http://81.184.21.22:100/hfs/c-obfuscado.txt
Data = C:\Mis documentos\c-obfuscado.txt
Button GET works and how text file in panel
Button POST give sequence events bellow.
POST Failed !
StatusCode   = 404
ReasonPhrase = Request aborted on timeout

Sure I missing to do something but I don't know what.


You cannot do a post to a document link unless there is a script (or 
whatever code is required) at server side to handle the post.


I suggest you first try posting using your favorite internet navigator 
to validate the webserver configuration, then you may start doing the 
same with the component.


Usually, the webserver has an HTML form with some fields (including 
file field) and a submit button. behing the submit button, you have 
the URL used to "post" the form. This is the URL you have to use with 
the component.


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.862 / Base de datos de virus: 271.1.1/3192 - Fecha de la version: 
10/12/10 08:34:00



--
Xavier Mor-Mur

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] help on httpcli post

2010-10-12 Thread Francois PIETTE
I try to include http get and post to my program and doing tests on 
OverbyteIcshttptst demo.

I get function GET work but not with function POST.

I configured at home free "HFS - HTTP File Server" from 
http://www.rejetto.com/hfs/

When running demo I set
URL = http://81.184.21.22:100/hfs/c-obfuscado.txt
Data = C:\Mis documentos\c-obfuscado.txt
Button GET works and how text file in panel
Button POST give sequence events bellow.
POST Failed !
StatusCode   = 404
ReasonPhrase = Request aborted on timeout

Sure I missing to do something but I don't know what.


You cannot do a post to a document link unless there is a script (or 
whatever code is required) at server side to handle the post.


I suggest you first try posting using your favorite internet navigator to 
validate the webserver configuration, then you may start doing the same with 
the component.


Usually, the webserver has an HTML form with some fields (including file 
field) and a submit button. behing the submit button, you have the URL used 
to "post" the form. This is the URL you have to use with the component.


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] help on httpcli post

2010-10-11 Thread Xavier Mor-Mur

 Hello to all
I try to include http get and post to my program and doing tests on 
OverbyteIcshttptst demo.

I get function GET work but not with function POST.

I configured at home free "HFS - HTTP File Server" from 
http://www.rejetto.com/hfs/

When running demo I set
URL = http://81.184.21.22:100/hfs/c-obfuscado.txt
Data = C:\Mis documentos\c-obfuscado.txt
Button GET works and how text file in panel
Button POST give sequence events bellow.

Sure I missing to do something but I don't know what.
You can play with this HFS server ( http://81.184.21.22:100 ) as I have 
to work with some ones like this.


Thanks for any help
Xavi

Sequence of events for POST.


[HttpCli1StateChange]

[HttpCli1StateChange]

[HttpCli1StateChange]

[HttpCli1StateChange]

[HttpCli1StateChange]

[HttpCli1RequestHeaderBegin]

[HttpCli1Command]
POST /hfs/c-obfuscado.txt HTTP/1.0

[HttpCli1Command]
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

[HttpCli1Command]
Content-Type: application/x-www-form-urlencoded

[HttpCli1Command]
User-Agent: Mozilla/3.0 (compatible)

[HttpCli1Command]
Host: 192.168.2.2:100

[HttpCli1Command]
Content-Length: 33

[HttpCli1RequestHeaderEnd]

[HttpCli1Command]


[HttpCli1SendBegin]

[HttpCli1SendData]
33

[HttpCli1SendEnd]

[HttpCli1StateChange]

[HttpCli1StateChange]
POST Failed !
StatusCode   = 404
ReasonPhrase = Request aborted on timeout

[RequestDone Error]
8

--
Xavier Mor-Mur

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] help to convert from utf8 to ansi (locale)

2010-04-29 Thread Xavier Mor-Mur

Hello Arno
Thanks your comments. I need update my head from ansi to unicode :-)
Should not be problem, or that I think, converting unicode encoded files 
to ansi. as all files will created on local network.
I will read a bit more about differences between UTF8String and 
UnicodeString, help from BC2009 is not clear.


Xavi

Al 29/04/2010 08:54, En/na Arno Garrels ha escrit:

Xavier Mor-Mur wrote:

   

String usStr; (or UnicodeString usStr;)
AnsiString asStr;

usStr = URLDEcode( "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" );
asStr = usStr;<--- Compiler introduce required conversion code

using
   asStr = UTF8Decode( usStr );
or
  asSTR = UTF8Decode( URLDEcode(
"Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" ) );
 

Conversion from Unicode to AnsiString might lead to dataloss,
whether the source be UTF-8 or UTF-16. If you actually need a
AnsiString with code page CP_UTF8 you should use type UTF8String
instead of AnsiString.
Since 2009 the compiler is code page aware and implicitly
converts between UTF8String and (Unicode)String without
dataloss and warnings. In this case one could also write a
slighty different version of UrlDecode() that returned a
UTF8String to save a few conversions.

--
Arno Garrels

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.814 / Base de datos de virus: 271.1.1/2840 - Fecha de la version: 
04/28/10 08:27:00

   


--
Xavier Mor-Mur

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] help to convert from utf8 to ansi (locale)

2010-04-29 Thread Xavier Mor-Mur

Hi RTT
Yes I use UrlDecode from OverbyteIcsUrl.hpp with defaults SrcCodePage 
and DetectUtf8. Alternative, I not found other, was include Indy 
component but using ICS I think isn't unnecessary.

I will check using no default parameters.

Thanks again
Xavi


Al 29/04/2010 03:16, En/na RTT ha escrit:

Hi Xavier,
The UTF8Decode is being performed automatically probably because you 
are using the UrlDecode function from OverbyteIcsHttpSrv. If you check 
its definition,


function UrlDecode(const Url: string; SrcCodePage: LongWord = CP_ACP;  
DetectUtf8: Boolean = TRUE): string;


there is a, default set to true, parameter,  DetectUtf8, to define if 
the auto-detection, and decoding, of UTF8 encoded strings must be made 
automatically by the function after the URLDecode conversion



Hi RTT

Thanks for your tips. Finally I get it work but I should write code a 
bit different


String usStr; (or UnicodeString usStr;)
AnsiString asStr;

usStr = URLDEcode( "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" );
asStr = usStr; <--- Compiler introduce required conversion code

using
 asStr = UTF8Decode( usStr );
or
asSTR = UTF8Decode( URLDEcode( 
"Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" ) );


give asStr = NULL
I think D2009 and BC2009 works diferent when doing inline automatic 
conversions.


Many thanks for all

Xavi



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.814 / Base de datos de virus: 271.1.1/2840 - Fecha de la version: 
04/28/10 08:27:00

   


--
Xavier Mor-Mur

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] help to convert from utf8 to ansi (locale)

2010-04-28 Thread Arno Garrels
Xavier Mor-Mur wrote:

> String usStr; (or UnicodeString usStr;)
> AnsiString asStr;
> 
> usStr = URLDEcode( "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" );
> asStr = usStr; <--- Compiler introduce required conversion code
> 
> using
>   asStr = UTF8Decode( usStr );
> or
>  asSTR = UTF8Decode( URLDEcode(
> "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" ) );

Conversion from Unicode to AnsiString might lead to dataloss, 
whether the source be UTF-8 or UTF-16. If you actually need a 
AnsiString with code page CP_UTF8 you should use type UTF8String
instead of AnsiString. 
Since 2009 the compiler is code page aware and implicitly 
converts between UTF8String and (Unicode)String without
dataloss and warnings. In this case one could also write a 
slighty different version of UrlDecode() that returned a 
UTF8String to save a few conversions.

--
Arno Garrels

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] help to convert from utf8 to ansi (locale)

2010-04-28 Thread RTT

Hi Xavier,
The UTF8Decode is being performed automatically probably because you are 
using the UrlDecode function from OverbyteIcsHttpSrv. If you check its 
definition,


function UrlDecode(const Url: string; SrcCodePage: LongWord = CP_ACP;  
DetectUtf8: Boolean = TRUE): string;


there is a, default set to true, parameter,  DetectUtf8, to define if 
the auto-detection, and decoding, of UTF8 encoded strings must be made 
automatically by the function after the URLDecode conversion



Hi RTT

Thanks for your tips. Finally I get it work but I should write code a 
bit different


String usStr; (or UnicodeString usStr;)
AnsiString asStr;

usStr = URLDEcode( "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" );
asStr = usStr; <--- Compiler introduce required conversion code

using
 asStr = UTF8Decode( usStr );
or
asSTR = UTF8Decode( URLDEcode( 
"Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" ) );


give asStr = NULL
I think D2009 and BC2009 works diferent when doing inline automatic 
conversions.


Many thanks for all

Xavi



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] help to convert from utf8 to ansi (locale)

2010-04-28 Thread Xavier Mor-Mur

Hi RTT

Thanks for your tips. Finally I get it work but I should write code a 
bit different


String usStr; (or UnicodeString usStr;)
AnsiString asStr;

usStr = URLDEcode( "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" );
asStr = usStr; <--- Compiler introduce required conversion code

using
 asStr = UTF8Decode( usStr );
or
asSTR = UTF8Decode( URLDEcode( 
"Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" ) );


give asStr = NULL
I think D2009 and BC2009 works diferent when doing inline automatic 
conversions.


Many thanks for all

Xavi


Al 29/04/2010 00:37, En/na RTT ha escrit:
Obviously what works fine is the sequence of decode transformations on 
your encoded filename, not in the already decoded string as I posted. 
Sorry.

This is the correct example:
UTF8Decode(URLDEcode('Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg'));


This seems to work fine

UTF8Decode(URLDecode('Sin título1_html_m5b7e3440.jpg'));


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be



Se certificó que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Versión: 9.0.814 / Base de datos de virus: 271.1.1/2840 - Fecha de la versión: 
04/28/10 08:27:00

   


--
Xavier Mor-Mur

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] help to convert from utf8 to ansi (locale)

2010-04-28 Thread RTT
Obviously what works fine is the sequence of decode transformations on 
your encoded filename, not in the already decoded string as I posted. Sorry.

This is the correct example:
UTF8Decode(URLDEcode('Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg'));


This seems to work fine

UTF8Decode(URLDecode('Sin título1_html_m5b7e3440.jpg'));


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] help to convert from utf8 to ansi (locale)

2010-04-28 Thread RTT

This seems to work fine

UTF8Decode(URLDecode('Sin título1_html_m5b7e3440.jpg'));


Curiosity struck, so I googled it...
Apparently you aren't the only one with this issue.
If you have the string before it gets encoded in the 1st place you can
convert to UTF8 first, then encode it to URL so you can decode it properly.
If you don't have access to the string before encoding... I think you have a
problem and may have to handle on your own.  You might be able to detect the
1st as a high ascii value and use that to flag using both to combine as one.

If you do find/create a solution, let us know.  I'm sure we'll run across
needing something like that at some point...

Matt

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of Xavier Mor-Mur
Sent: Wednesday, April 28, 2010 15:53
To: ICS support mailing
Subject: Re: [twsocket] help to convert from utf8 to ansi (locale)

Thanks for the tip.

I tried it with no success.
URLEncode and URLDecode work apparently byte a byte and %C3%AD are converted
as individual chars.
UTF8Encode and UTF8Decode I don't get it work.
certainly I'm doing something wrong.

Regards
Xavi

Al 28/04/2010 22:36, En/na Matt Minnis ha escrit:
   

The %## codes are representations of the character.  It looks like a
URL encoding scheme to me.
For example:  %20 is the space character. The %C3%AD looks to be the
letter i with the accent.
Run it though a URL Decoder and see if that doesn't get you what you
are looking for?

Matt

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
On Behalf Of Xavier Mor-Mur
Sent: Wednesday, April 28, 2010 14:19
To: ICS support mailing
Subject: [twsocket] help to convert from utf8 to ansi (locale)

Hi to all

I need to parse text to send via email if there are declared any file.
If text is html and saved from word processors or html editors all
chars out of first 127 ASCII set are convert using utf8 convention.
What I need is recover original text to check if declared files exists.

First I was working with BCB5 but it have reduced support for unicode
strings.
Now I'm using BC2009 but I'm walking around the same point.

Example of I get as parameter and what I need to test :
from file I get "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg"
and I need "Sin título1_html_m5b7e3440.jpg"

I played with ansi, wide, unicode, utf8 variables and functions with
no success.

Thanks in advance for your help.

--
Xavier Mor-Mur

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be



Se certificó que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Versión: 9.0.814 / Base de datos de virus: 271.1.1/2840 - Fecha de la
versión: 04/28/10 08:27:00


 

--
Xavier Mor-Mur

--
To unsubscribe or change your settings for TWSocket mailing list please goto
http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


   


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] help to convert from utf8 to ansi (locale)

2010-04-28 Thread Xavier Mor-Mur

I'll will work on it as I need to solve.
Situation exposed is a test after report program was not working properly.
As I detected MS-Word encode partially and OpenOffice encode fully.

Regards


Al 28/04/2010 23:41, En/na Matt Minnis ha escrit:

Al 28/04/2010 22:36, En/na Matt Minnis ha escrit:
   

>  The %## codes are representations of the character.  It looks like a
>  URL encoding scheme to me.
>  For example:  %20 is the space character. The %C3%AD looks to be the
>  letter i with the accent.
>  Run it though a URL Decoder and see if that doesn't get you what you
>  are looking for?
>
>  Matt
>
 


--
Xavier Mor-Mur

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] help to convert from utf8 to ansi (locale)

2010-04-28 Thread Matt Minnis
Curiosity struck, so I googled it...
Apparently you aren't the only one with this issue.
If you have the string before it gets encoded in the 1st place you can
convert to UTF8 first, then encode it to URL so you can decode it properly.
If you don't have access to the string before encoding... I think you have a
problem and may have to handle on your own.  You might be able to detect the
1st as a high ascii value and use that to flag using both to combine as one.

If you do find/create a solution, let us know.  I'm sure we'll run across
needing something like that at some point...

Matt

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of Xavier Mor-Mur
Sent: Wednesday, April 28, 2010 15:53
To: ICS support mailing
Subject: Re: [twsocket] help to convert from utf8 to ansi (locale)

Thanks for the tip.

I tried it with no success.
URLEncode and URLDecode work apparently byte a byte and %C3%AD are converted
as individual chars.
UTF8Encode and UTF8Decode I don't get it work.
certainly I'm doing something wrong.

Regards
Xavi

Al 28/04/2010 22:36, En/na Matt Minnis ha escrit:
> The %## codes are representations of the character.  It looks like a 
> URL encoding scheme to me.
> For example:  %20 is the space character. The %C3%AD looks to be the 
> letter i with the accent.
> Run it though a URL Decoder and see if that doesn't get you what you 
> are looking for?
>
> Matt
>
> -Original Message-
> From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] 
> On Behalf Of Xavier Mor-Mur
> Sent: Wednesday, April 28, 2010 14:19
> To: ICS support mailing
> Subject: [twsocket] help to convert from utf8 to ansi (locale)
>
> Hi to all
>
> I need to parse text to send via email if there are declared any file.
> If text is html and saved from word processors or html editors all 
> chars out of first 127 ASCII set are convert using utf8 convention.
> What I need is recover original text to check if declared files exists.
>
> First I was working with BCB5 but it have reduced support for unicode 
> strings.
> Now I'm using BC2009 but I'm walking around the same point.
>
> Example of I get as parameter and what I need to test :
> from file I get "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg"
> and I need "Sin título1_html_m5b7e3440.jpg"
>
> I played with ansi, wide, unicode, utf8 variables and functions with 
> no success.
>
> Thanks in advance for your help.
>
> --
> Xavier Mor-Mur
>
> --
> To unsubscribe or change your settings for TWSocket mailing list 
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
> --
> To unsubscribe or change your settings for TWSocket mailing list 
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
>
>
> Se certificó que el correo entrante no contiene virus.
> Comprobada por AVG - www.avg.es
> Versión: 9.0.814 / Base de datos de virus: 271.1.1/2840 - Fecha de la 
> versión: 04/28/10 08:27:00
>
>

--
Xavier Mor-Mur

--
To unsubscribe or change your settings for TWSocket mailing list please goto
http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] help to convert from utf8 to ansi (locale)

2010-04-28 Thread Xavier Mor-Mur

Thanks for the tip.

I tried it with no success.
URLEncode and URLDecode work apparently byte a byte and %C3%AD are 
converted as individual chars.

UTF8Encode and UTF8Decode I don't get it work.
certainly I'm doing something wrong.

Regards
Xavi

Al 28/04/2010 22:36, En/na Matt Minnis ha escrit:

The %## codes are representations of the character.  It looks like a URL
encoding scheme to me.
For example:  %20 is the space character. The %C3%AD looks to be the letter
i with the accent.
Run it though a URL Decoder and see if that doesn't get you what you are
looking for?

Matt

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of Xavier Mor-Mur
Sent: Wednesday, April 28, 2010 14:19
To: ICS support mailing
Subject: [twsocket] help to convert from utf8 to ansi (locale)

Hi to all

I need to parse text to send via email if there are declared any file.
If text is html and saved from word processors or html editors all chars out
of first 127 ASCII set are convert using utf8 convention.
What I need is recover original text to check if declared files exists.

First I was working with BCB5 but it have reduced support for unicode
strings.
Now I'm using BC2009 but I'm walking around the same point.

Example of I get as parameter and what I need to test :
from file I get "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg"
and I need "Sin título1_html_m5b7e3440.jpg"

I played with ansi, wide, unicode, utf8 variables and functions with no
success.

Thanks in advance for your help.

--
Xavier Mor-Mur

--
To unsubscribe or change your settings for TWSocket mailing list please goto
http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be



Se certificó que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Versión: 9.0.814 / Base de datos de virus: 271.1.1/2840 - Fecha de la versión: 
04/28/10 08:27:00

   


--
Xavier Mor-Mur

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] help to convert from utf8 to ansi (locale)

2010-04-28 Thread Matt Minnis
The %## codes are representations of the character.  It looks like a URL
encoding scheme to me.
For example:  %20 is the space character. The %C3%AD looks to be the letter
i with the accent.
Run it though a URL Decoder and see if that doesn’t get you what you are
looking for?

Matt

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of Xavier Mor-Mur
Sent: Wednesday, April 28, 2010 14:19
To: ICS support mailing
Subject: [twsocket] help to convert from utf8 to ansi (locale)

Hi to all

I need to parse text to send via email if there are declared any file.
If text is html and saved from word processors or html editors all chars out
of first 127 ASCII set are convert using utf8 convention.
What I need is recover original text to check if declared files exists.

First I was working with BCB5 but it have reduced support for unicode
strings.
Now I'm using BC2009 but I'm walking around the same point.

Example of I get as parameter and what I need to test :
from file I get "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg"
and I need "Sin título1_html_m5b7e3440.jpg"

I played with ansi, wide, unicode, utf8 variables and functions with no
success.

Thanks in advance for your help.

--
Xavier Mor-Mur

--
To unsubscribe or change your settings for TWSocket mailing list please goto
http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] help to convert from utf8 to ansi (locale)

2010-04-28 Thread Xavier Mor-Mur

Hi to all

I need to parse text to send via email if there are declared any file.
If text is html and saved from word processors or html editors all chars 
out of first 127 ASCII set are convert using utf8 convention.

What I need is recover original text to check if declared files exists.

First I was working with BCB5 but it have reduced support for unicode 
strings.

Now I'm using BC2009 but I'm walking around the same point.

Example of I get as parameter and what I need to test :
from file I get "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg"
and I need "Sin título1_html_m5b7e3440.jpg"

I played with ansi, wide, unicode, utf8 variables and functions with no 
success.


Thanks in advance for your help.

--
Xavier Mor-Mur

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Help on installing ICS

2009-10-09 Thread Arno Garrels
John Barrat wrote:
> Can you help?

> cannot resolve the unit name WSocket. 

Unit WSocket does not exist in both ICS V6 and V7, obviously
you are trying to compile an old V5 project.
To convert the old project first rename all ICS unit names in
the uses clause to OverbyteIcs. In most cases it
will compile afterwards. 

--
Arno Garrels


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Help on installing ICS

2009-10-09 Thread John Barrat
Can you help?
 
I have Delphi 2007 installed and had previously installed the ICS for 2007.
I am not sure what version as it was over a year ago and I had always
assumed if I needed to re-install I would get the latest from the website.
 
I recently had to reinstall Delphi 2007 after doing a complete re-install of
Windows XP.
 
I downloaded ICSV6 from the website and followed the installation
instructions.  i.e. Opened OverbyteIcsDel110Package.dproj in Delphi and
installed.
 
I get a compile error in OverbyteIcsHttpSvr Undeclared ientifier
_IntToStr
 
This is the line:
FWSocketServer.Name := ClassName + '_SrvSocket' +
_IntToStr(SafeWSocketGCount);
 
I removed the underscore and it continued to compile and install.
 
However, when I add a TWSocket control to my application I get the error
Cannot resolve unit name  WSocket.
 
I have made sure there is an entry in the library path and also added it to
the Browse path:
 
i.e.  C:\Program Files\CodeGear\Overbyte\Delphi\Vc32
 
After un-installing ICSV6 I also downloaded the ICSV7 and attempted the
installation.
This compiled fine without the error and again installed all the design time
stuff but once again the compiler cannot resolve the unit name WSocket.
 
What am I doing wrong or what haven't I done.
 
I repeated 
 
JohnB
 
 
 
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Help please with HttpCli

2009-01-17 Thread Francois PIETTE
>I am just starting to use ICS and having problems with the demos.  My 
>problem is with the HttpGet
> demo program.  All works ok if the target Url domain is ok and the file 
> exists on the site, but if I make
> the filename invalid by adding a letter, I get an Exception thrown in 
> Delphi. Similar problem if I alter
> the domain by adding a letter, I get the Exception.
>
> I don't understand this, as I am running in a Try/Except block.  I also 
> have an OnRequestDone
> procedure coded, which I made to check for status code 404 (indicating 
> document not found).
>
> What simple error am I seeing please?

I cannot reproduce your problem: I tested with HttpGet sample program and 
exception is perfectly catched in GetButtonClick do display a correct error 
message.

btw: There is an exception thrown in Delphi, but this is perfectly normal 
and - as I said - is handled by the demo.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Help please with HttpCli

2009-01-17 Thread Martin Ireland
I am just starting to use ICS and having problems with the demos.  My problem 
is with the HttpGet 
demo program.  All works ok if the target Url domain is ok and the file exists 
on the site, but if I make 
the filename invalid by adding a letter, I get an Exception thrown in Delphi. 
Similar problem if I alter 
the domain by adding a letter, I get the Exception. 

I don't understand this, as I am running in a Try/Except block.  I also have an 
OnRequestDone 
procedure coded, which I made to check for status code 404 (indicating document 
not found).

What simple error am I seeing please?

Martin


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Help with SmtpClient

2007-11-30 Thread [EMAIL PROTECTED]
Hello:

   The problem is on calling the Helo():  That method
is "asynchroneous", meaning that it does not wait for
the server's response before returning; it will
eventually trigger the OnRequestDone event when the
server's response arrives.

   However, you are using the Open() method, which
already sends the HELO command itself.  To fix your
problem, just remove the call to Helo(), and leave
Open() followed by Mail().  Open and Mail are
"synchrenous" methods.

   The SmtpCli component, as all other ICS
components, have built-in sync and async methods. 
The sync methods are for quick and easy development:
 you make the call and it will return when completed.
 The async methods are more advanced and require an
event-driven approach to programming, similar to the
style of the VCL itself.  Although it is a bit more
complicated, we always recommend you use the async
methods, which give you more control, and help keep
your application more responsive.

-dZ.


>--- Original Message ---
>From: Victor Gooch[mailto:[EMAIL PROTECTED]
>Sent: 11/30/2007 2:44:25 PM
>To  : twsocket@elists.org
>Cc  : 
>Subject : RE: [twsocket] Help with SmtpClient
>
 >I am using BCB6 with SmtpClient. My program
executes Open() then Helo() with no errors but when I
try to 
execute Mail() I get an error message that the
"Component is not Ready".  I have examined the property
settings several times but do not see why Mail() does
not work.  

is this a FAQ ?  Are there any suggestions?

thanks,
Victor
-- 
To unsubscribe or change your settings for TWSocket
mailing list
please goto 
http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket

Visit our website at  http://www.overbyte.be 


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Help with SmtpClient

2007-11-30 Thread Francois PIETTE
>I am using BCB6 with SmtpClient. My program executes Open() 
> then Helo() with no errors but when I try to 
> execute Mail() I get an error message that the "Component is 
> not Ready".  I have examined the property
> settings several times but do not see why Mail() does not work.  

You are trying to use the asynchronous component as a synchronous one.

> is this a FAQ ?  Are there any suggestions?

See http://wiki.overbyte.be, there is an article about async programming.
You may also use the sync version but it is much less optimal.


Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Help with SmtpClient

2007-11-30 Thread Arno Garrels
Victor Gooch wrote:
> I am using BCB6 with SmtpClient. My program executes Open() then
> Helo() with no errors but when I try to execute Mail() I get an error
> message that the "Component is not Ready".  I have examined the
> property settings several times but do not see why Mail() does not
> work.  
> 
> is this a FAQ ?  

Looks like that ;-) You get this error when you do not code event-driven.
Check this link: http://wiki.overbyte.be/wiki/index.php/Asynchronous_Paradigm
to get started.

--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html





-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Help with SmtpClient

2007-11-30 Thread Victor Gooch
I am using BCB6 with SmtpClient. My program executes Open() then Helo() with no 
errors but when I try to 
execute Mail() I get an error message that the "Component is not Ready".  I 
have examined the property
settings several times but do not see why Mail() does not work.  

is this a FAQ ?  Are there any suggestions?

thanks,
Victor
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Help with re-install simply WSocket?

2007-08-19 Thread Arno Garrels
TK Boyd wrote:
> 
> "Cannot assign to read only property"
> 
> ... when it hits
> 
> FLogFile.Size:=0
> 
> ... in ICSLogger.

Yes, seems to be read only in D2, since D3 Size is read/write.
Eather try to change this line to FLogFile.Position := 0 (not 
sure whether that would work the same)
or define  NO_DEBUG_LOG  in the project options to exclude 
the IcsLogger component.

--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
-- 
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] Help with re-install simply WSocket?

2007-08-19 Thread TK Boyd
Sorry I didn't follow up earlier suggestions more quickly... I wanted 
to research things further before asking again

To recap: I'm trying to install ICS on a Win98Se system, for use with 
Delphi2. I've done it before... but a while ago... so I MAY be help-
able!...

When I try to install even WSocket, my Delphi refuses, throwing 
up

"Cannot assign to read only property"

... when it hits

FLogFile.Size:=0

... in ICSLogger.

FLogFile is of type TFileStream, which is a Borland supplied 
descendant of TStream, with the "size" property read-only. I don't 
think the {+$J} directive is about getting around this sort of thing, 
is it? (I did try that route... from several directions... no luck.

My guess: I wonder if ICSLogger is an extra feature, added since the 
last time I installed ICS (the time I was successful with D2/Win98!) 
And, still guessing, ICSLogger uses something D2 unfriendly.

My hope: I'm wondering if it would be a huge task, or a wreck-the-
basic-features-of WSocket / WSocketE / WSocketS / HttpProt to take 
ICSLogger OUT of those ICS components, and get around the can't-
compile-with-D2 problem that way? I presume ICSLogger is something to 
log some information as packets travel back and forth? Can I live 
without it?

I'm not looking for a promise that I have the skill to take it out... 
but if you know it would be a futile exercise which would make any of 
the components I mentioned Just Not Work, I'd be grateful to be saved 
the time.

Tom

On 12 Aug 2007 at 19:08, Francois PIETTE wrote:

From:   "Francois PIETTE" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Date sent:      Sun, 12 Aug 2007 19:08:00 +0200
Subject:Re: [twsocket] Help with re-install simply WSocket?
Send reply to:  ICS support mailing 
<mailto:[EMAIL PROTECTED]>
<mailto:[EMAIL PROTECTED]>

> You have to change the options to have "writable const".
> 
> --
> [EMAIL PROTECTED]
> The author of the freeware multi-tier middleware MidWare
> The author of the freeware Internet Component Suite (ICS)
> http://www.overbyte.be
> 
> ----- Original Message - 
> From: "TK Boyd" <[EMAIL PROTECTED]>
> To: 
> Sent: Sunday, August 12, 2007 6:33 PM
> Subject: [twsocket] Help with re-install simply WSocket?
> 
> 
> > Sorry folks... Help?

> > === No need to read the rest!
> > 
> > Have a look at...
> > 
> > http://mon277rr.dyndns.org
> > 
> > ... if you are curious about what you are helping. That's a graph of
> > the weather where I am, about 8 days' worth. Red line: Outdoor
> > tture.
> > 
> > See
> > 
> > http://sheepdogsoftware.co.uk/ssds043.htm
> > 
> > if the visible-from-afar weather interests you.
> > 
> > http://sheepdogsoftware.co.uk  TK Boyd's site with
> > freeware and shareware for kids, parents, schools... and others.
> > (Apologies for the extra stuff below tacked on by Yahoo...)
> > 


http://sheepdogsoftware.co.uk  TK Boyd's site with
freeware and shareware for kids, parents, schools... and others.
(Apologies for the extra stuff below tacked on by Yahoo...)

-- 
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] Help with re-install simply WSocket?

2007-08-13 Thread Francois PIETTE
> Assignable Typed Constants

This is the correct option.

> ... but I could only get into that when I had a project open.

I don't remember very well D2, but the options for the library are for sure 
stored somewhere. If not, you can add in the offending source a compile time 
directive {$J+}. Normally this option is already somewhere in ICS source 
code.

-- 
[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


Re: [twsocket] Help with re-install simply WSocket?

2007-08-12 Thread TK Boyd
Thank you for the quick reply... especially in support of an old 
environment.

I wrestled a bit with your suggestion... no joy. Maybe I 
misunderstood. More in a moment.

First a little "horn blowing" to reassure you that you're not dealing 
with a complete idiot: I'm delighted to say that I HAVE managed to 
install some core elements of ICS in a Delphi 4 / Win98SE 
environment. With that, I accomplished the "need it now" job but 
I'd still like to solve the "Install to Delphi 2 / Win98SE" problem.

You advised that my problem could be because I need to change the 
options to have "writable const". I tried... but I don't seem to have 
found the right thing. Is this a setting I make to my Delphi? Do I 
tweak the code from ics.zip?

The closest candidate I could find was in

Project - Options

... where there was a tickbox for

Assignable Typed Constants

... but I could only get into that when I had a project open.

Clarification of your suggestion would be welcome... sorry

Tom

On 12 Aug 2007 at 19:08, Francois PIETTE wrote:

From:   "Francois PIETTE" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Date sent:      Sun, 12 Aug 2007 19:08:00 +0200
Subject:Re: [twsocket] Help with re-install simply WSocket?
Send reply to:  ICS support mailing 
<mailto:[EMAIL PROTECTED]>
<mailto:[EMAIL PROTECTED]>

> You have to change the options to have "writable const".
> 
> --
> [EMAIL PROTECTED]
> The author of the freeware multi-tier middleware MidWare
> The author of the freeware Internet Component Suite (ICS)
> http://www.overbyte.be
> 
> ----- Original Message - 
> From: "TK Boyd" <[EMAIL PROTECTED]>
> To: 
> Sent: Sunday, August 12, 2007 6:33 PM
> Subject: [twsocket] Help with re-install simply WSocket?
> 
> 
> > Sorry folks... Help? About 2 years ago I set ICS up on a Win98
> > system with Delphi 2... I am not a complete idiot, I CAN do it... or
> > at least I could. Ideas on where I'm going wrong in the following
> > would be very welcome. I tried to repeat my previous triumph
> > but.. so far.. no joy.
> > 
> > I like to keep things simple. I like to keep my core Delphi system
> > as untouched as possible. So...
> > 
> > 12 Aug 07, I downloaded ics.zip (ICS-V5 Distribution) from Overbyte.
> > 
> > I unzipped it to a folder of it's own. (Yes, I kept the ics paths
> > intact.)
> > 
> > I backed up Delphi's cmplib32.dcl
> > 
> > I set up a sub-folder ("ICS") within Delphi's delphi 2.0\lib\ so
> > that my ICS stuff wouldn't be all mixed up with other components.
> > 
> > I copied icsdefs.inc, WSocket.pas and ICSlogger.pas to that
> > folder...
> > 
> > and then I tried (within a freshly started Delphi 2, no app-in-
> > development open. Win98SE environment.)
> > 
> > Component | Install | Add...
> > 
> > (I did what was necessary to get Delphi to "look" at the WSocket.pas
> > file)
> > 
> > On the first attempt, the compiler objected to a line in ICSLogger.
> > The line was...
> > 
> > "else
> >FLogFile.Size := 0;"
> > 
> > ... and the objection was...
> >
> > "Cannot assign to a read-only property"
> > 
> > 
> > Thoughts? I'm so frustrated! I know I have ICS working nicely on a
> > different computer, same Delphi (ver 2), same OS (Win98SE). Possible
> > a different ICS... I think it was abou 2005 I set it up on the other
> > machine.
> > 
> > Help?? Please??
> > 
> > ===
> > Further clue?
> > 
> > In desperation, I remmed out the offending line, and tried to
> > install the component again. (Yes, I realize it would have been an
> > unreliable component!)
> > 
> > This time the compiler fell over in WSocket.pas at
> > 
> >Status := WSocket_WSAIoctl(FHSocket,  SIO_KEEPALIVE_VALS,
> >   @KeepAliveIn,  SizeOf(KeepAliveIn),
> >   @KeepAliveOut, SizeOf(KeepAliveOut),
> >   BytesReturned, nil, nil);
> > 
> >  the error message was...
> > 
> > "Types of actual and formal var parameters must be identical"
> > 
> > Help will be much appreciated!
> > 
> > === No need to read the rest!
> > 
> > Have a look at...
> > 
> > http://mon277rr.dyndns.org
> > 
> > ... if you are curious about what you are he

Re: [twsocket] Help with re-install simply WSocket?

2007-08-12 Thread Francois PIETTE
You have to change the options to have "writable const".

--
[EMAIL PROTECTED]
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

- Original Message - 
From: "TK Boyd" <[EMAIL PROTECTED]>
To: 
Sent: Sunday, August 12, 2007 6:33 PM
Subject: [twsocket] Help with re-install simply WSocket?


> Sorry folks... Help? About 2 years ago I set ICS up on a Win98 system 
> with Delphi 2... I am not a complete idiot, I CAN do it... or at 
> least I could. Ideas on where I'm going wrong in the following would 
> be very welcome. I tried to repeat my previous triumph but.. so 
> far.. no joy.
> 
> I like to keep things simple. I like to keep my core Delphi system as 
> untouched as possible. So...
> 
> 12 Aug 07, I downloaded ics.zip (ICS-V5 Distribution) from Overbyte.
> 
> I unzipped it to a folder of it's own. (Yes, I kept the ics paths 
> intact.)
> 
> I backed up Delphi's cmplib32.dcl
> 
> I set up a sub-folder ("ICS") within Delphi's delphi 2.0\lib\ so that 
> my ICS stuff wouldn't be all mixed up with other components.
> 
> I copied icsdefs.inc, WSocket.pas and ICSlogger.pas to that folder...
> 
> and then I tried (within a freshly started Delphi 2, no app-in-
> development open. Win98SE environment.)
> 
> Component | Install | Add...
> 
> (I did what was necessary to get Delphi to "look" at the WSocket.pas 
> file)
> 
> On the first attempt, the compiler objected to a line in ICSLogger. 
> The line was...
> 
> "else
>FLogFile.Size := 0;"
> 
> ... and the objection was...
>
> "Cannot assign to a read-only property"
> 
> 
> Thoughts? I'm so frustrated! I know I have ICS working nicely on a 
> different computer, same Delphi (ver 2), same OS (Win98SE). Possible 
> a different ICS... I think it was abou 2005 I set it up on the other 
> machine.
> 
> Help?? Please??
> 
> ===
> Further clue?
> 
> In desperation, I remmed out the offending line, and tried to install 
> the component again. (Yes, I realize it would have been an unreliable 
> component!)
> 
> This time the compiler fell over in WSocket.pas at
> 
>Status := WSocket_WSAIoctl(FHSocket,  SIO_KEEPALIVE_VALS,
>   @KeepAliveIn,  SizeOf(KeepAliveIn),
>   @KeepAliveOut, SizeOf(KeepAliveOut),
>   BytesReturned, nil, nil);
> 
>  the error message was...
> 
> "Types of actual and formal var parameters must be identical"
> 
> Help will be much appreciated!
> 
> === No need to read the rest!
> 
> Have a look at...
> 
> http://mon277rr.dyndns.org
> 
> ... if you are curious about what you are helping. That's a graph of 
> the weather where I am, about 8 days' worth. Red line: Outdoor tture.
> 
> (Yes, there's a slight bug in the Quote Creator scraps of earlier 
> quotes are sometimes still on the screen.)
> 
> See
> 
> http://sheepdogsoftware.co.uk/ssds043.htm
> 
> if the visible-from-afar weather interests you.
> 
> 
> 
> 
> 
> http://sheepdogsoftware.co.uk  TK Boyd's site with
> freeware and shareware for kids, parents, schools... and others.
> (Apologies for the extra stuff below tacked on by Yahoo...)
> 
> -- 
> 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] Help with re-install simply WSocket?

2007-08-12 Thread TK Boyd
Sorry folks... Help? About 2 years ago I set ICS up on a Win98 system 
with Delphi 2... I am not a complete idiot, I CAN do it... or at 
least I could. Ideas on where I'm going wrong in the following would 
be very welcome. I tried to repeat my previous triumph but.. so 
far.. no joy.

I like to keep things simple. I like to keep my core Delphi system as 
untouched as possible. So...

12 Aug 07, I downloaded ics.zip (ICS-V5 Distribution) from Overbyte.

I unzipped it to a folder of it's own. (Yes, I kept the ics paths 
intact.)

I backed up Delphi's cmplib32.dcl

I set up a sub-folder ("ICS") within Delphi's delphi 2.0\lib\ so that 
my ICS stuff wouldn't be all mixed up with other components.

I copied icsdefs.inc, WSocket.pas and ICSlogger.pas to that folder...

and then I tried (within a freshly started Delphi 2, no app-in-
development open. Win98SE environment.)

Component | Install | Add...

(I did what was necessary to get Delphi to "look" at the WSocket.pas 
file)

On the first attempt, the compiler objected to a line in ICSLogger. 
The line was...

"else
FLogFile.Size := 0;"

... and the objection was...

"Cannot assign to a read-only property"


Thoughts? I'm so frustrated! I know I have ICS working nicely on a 
different computer, same Delphi (ver 2), same OS (Win98SE). Possible 
a different ICS... I think it was abou 2005 I set it up on the other 
machine.

Help?? Please??

===
Further clue?

In desperation, I remmed out the offending line, and tried to install 
the component again. (Yes, I realize it would have been an unreliable 
component!)

This time the compiler fell over in WSocket.pas at

Status := WSocket_WSAIoctl(FHSocket,  SIO_KEEPALIVE_VALS,
   @KeepAliveIn,  SizeOf(KeepAliveIn),
   @KeepAliveOut, SizeOf(KeepAliveOut),
   BytesReturned, nil, nil);

 the error message was...
 
"Types of actual and formal var parameters must be identical"

Help will be much appreciated!

=== No need to read the rest!

Have a look at...

http://mon277rr.dyndns.org

... if you are curious about what you are helping. That's a graph of 
the weather where I am, about 8 days' worth. Red line: Outdoor tture.

(Yes, there's a slight bug in the Quote Creator scraps of earlier 
quotes are sometimes still on the screen.)

See

http://sheepdogsoftware.co.uk/ssds043.htm

if the visible-from-afar weather interests you.





http://sheepdogsoftware.co.uk  TK Boyd's site with
freeware and shareware for kids, parents, schools... and others.
(Apologies for the extra stuff below tacked on by Yahoo...)

-- 
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] Help in understanding Web Service

2007-02-05 Thread mike
Francois,

Thank you for the reply.

I did actually get a web page to be sent, but what I did was load a web page 
with
Stream->LoadFromFile(); So I am not sure why the dynamic virtual page was not
sent.

If you could send me the compiled version then I could test it and see if it 
works.
I am using Builder 5 just to let you know. 

Thanks

Mike

-Original Message-
>From: Francois PIETTE <[EMAIL PROTECTED]>
>Sent: Feb 4, 2007 10:10 AM
>To: ICS support mailing 
>Subject: Re: [twsocket] Help in understanding Web Service
>
>You probably have a problem with your ICS installation. Please download 
>again from my website and reinstall.
>If you want I can mail you the executable built with the latest release so 
>that you can verify it works on your system (in that case you ICS 
>installation is corrupted) or not (in that case your system has something 
>special - at least).
>
>--
>Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
>--
>[EMAIL PROTECTED]
>http://www.overbyte.be
>
>
>- Original Message - 
>From: "mike" <[EMAIL PROTECTED]>
>To: "ICS support mailing" 
>Sent: Sunday, February 04, 2007 2:08 PM
>Subject: Re: [twsocket] Help in understanding Web Service
>
>
>> Hello,
>>
>> Well I have studied the webserv example more and seem to have a bit better 
>> understanding of what is happening, however I have some additional 
>> questions which I hope someone could answer for me.
>>
>> 1- In the sample, if a request comes in to send to the browser a web page 
>> indicated as "/time.htm", webserv is supposed to send back a virtual page 
>> constructed from within the sample. The virtual page consists of some 
>> basic html code which is built in a data stream and then the data stream 
>> is sent via the
>>
>> ((TMyHttpConnection *)Client)->SendStream();
>>
>> However the browser never receives this web page. I don't understand why 
>> this page would never be received by the browser. Could someone explain 
>> this to me or tell me how it should be sent to the browser.
>>
>> Thank you
>>
>> Mike
>>
>>
>> -- 
>> 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

-- 
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] Help in understanding Web Service

2007-02-04 Thread mike
Francois,

Thank you for the reply.

I did actually get a web page to be sent, but what I did was load a web page 
with  Stream->LoadFromFile(); So I am not sure why the dynamic virtual page was 
not sent.

If you could send me the compiled version then I could test it and see if it 
works. I am using Builder 5 just to let you know. 

Thanks

Mike


-Original Message-
>From: Francois PIETTE <[EMAIL PROTECTED]>
>Sent: Feb 4, 2007 10:10 AM
>To: ICS support mailing 
>Subject: Re: [twsocket] Help in understanding Web Service
>
>You probably have a problem with your ICS installation. Please download 
>again from my website and reinstall.
>If you want I can mail you the executable built with the latest release so 
>that you can verify it works on your system (in that case you ICS 
>installation is corrupted) or not (in that case your system has something 
>special - at least).
>
>--
>Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
>--
>[EMAIL PROTECTED]
>http://www.overbyte.be
>
>
>- Original Message - 
>From: "mike" <[EMAIL PROTECTED]>
>To: "ICS support mailing" 
>Sent: Sunday, February 04, 2007 2:08 PM
>Subject: Re: [twsocket] Help in understanding Web Service
>
>
>> Hello,
>>
>> Well I have studied the webserv example more and seem to have a bit better 
>> understanding of what is happening, however I have some additional 
>> questions which I hope someone could answer for me.
>>
>> 1- In the sample, if a request comes in to send to the browser a web page 
>> indicated as "/time.htm", webserv is supposed to send back a virtual page 
>> constructed from within the sample. The virtual page consists of some 
>> basic html code which is built in a data stream and then the data stream 
>> is sent via the
>>
>> ((TMyHttpConnection *)Client)->SendStream();
>>
>> However the browser never receives this web page. I don't understand why 
>> this page would never be received by the browser. Could someone explain 
>> this to me or tell me how it should be sent to the browser.
>>
>> Thank you
>>
>> Mike
>>
>>
>> -- 
>> 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

-- 
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] Help in understanding Web Service

2007-02-04 Thread Francois PIETTE
You probably have a problem with your ICS installation. Please download 
again from my website and reinstall.
If you want I can mail you the executable built with the latest release so 
that you can verify it works on your system (in that case you ICS 
installation is corrupted) or not (in that case your system has something 
special - at least).

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be


- Original Message - 
From: "mike" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Sunday, February 04, 2007 2:08 PM
Subject: Re: [twsocket] Help in understanding Web Service


> Hello,
>
> Well I have studied the webserv example more and seem to have a bit better 
> understanding of what is happening, however I have some additional 
> questions which I hope someone could answer for me.
>
> 1- In the sample, if a request comes in to send to the browser a web page 
> indicated as "/time.htm", webserv is supposed to send back a virtual page 
> constructed from within the sample. The virtual page consists of some 
> basic html code which is built in a data stream and then the data stream 
> is sent via the
>
> ((TMyHttpConnection *)Client)->SendStream();
>
> However the browser never receives this web page. I don't understand why 
> this page would never be received by the browser. Could someone explain 
> this to me or tell me how it should be sent to the browser.
>
> Thank you
>
> Mike
>
>
> -- 
> 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] Help in understanding Web Service

2007-02-04 Thread mike
Hello,

Well I have studied the webserv example more and seem to have a bit better 
understanding of what is happening, however I have some additional questions 
which I hope someone could answer for me.

1- In the sample, if a request comes in to send to the browser a web page 
indicated as "/time.htm", webserv is supposed to send back a virtual page 
constructed from within the sample. The virtual page consists of some basic 
html code which is built in a data stream and then the data stream is sent via 
the 

((TMyHttpConnection *)Client)->SendStream();

However the browser never receives this web page. I don't understand why this 
page would never be received by the browser. Could someone explain this to me 
or tell me how it should be sent to the browser.

Thank you 

Mike


-- 
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] Help in understanding Web Service

2007-02-03 Thread mike
Bevan,

Thank you.

Ah, yes you are correct. To many late nights!!!

Mike

-Original Message-
>From: [EMAIL PROTECTED]
>Sent: Feb 3, 2007 9:06 PM
>To: twsocket@elists.org
>Subject: Re: [twsocket] Help in understanding Web Service
>
>Hi Mike,
>
>> I have a need to create a Web Server to answer requests from web browsers.
>> So I have tried the WebServ example but I am not sure how to send requests
>> to it. Here is what I tried;
>> 
>> 1- Ran the application on my windows XP machine and when I tried to start
>> the service on port 80 I received an exception stating the address is
>> already in use. (10048 error)
>
>So you have a web server running on your machine already - probably Personal 
>Web Server, or something like that.
>
>> 2- So I tried a different port (6080) and the service started ok.
>> 
>> 3- So now from Internet Explorer I tried to connect to the service with the
>> following
>> 
>> http://pavallion8000/webserv:6280/
>> 
>> and I received a web page stating ;
>> 
>> Forbidden
>> You don´t have permission to access /webserv:6280/ on this server.
>
>I think you want http://localhost:6080 or http://pavallion8000:6080
>
>Regards,
>
>Bevan
>
>
>
>
>

-- 
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] Help in understanding Web Service

2007-02-03 Thread bevan
Hi Mike,

> I have a need to create a Web Server to answer requests from web browsers.
> So I have tried the WebServ example but I am not sure how to send requests
> to it. Here is what I tried;
> 
> 1- Ran the application on my windows XP machine and when I tried to start
> the service on port 80 I received an exception stating the address is
> already in use. (10048 error)

So you have a web server running on your machine already - probably Personal 
Web Server, or something like that.

> 2- So I tried a different port (6080) and the service started ok.
> 
> 3- So now from Internet Explorer I tried to connect to the service with the
> following
> 
> http://pavallion8000/webserv:6280/
> 
> and I received a web page stating ;
> 
> Forbidden
> You don´t have permission to access /webserv:6280/ on this server.

I think you want http://localhost:6080 or http://pavallion8000:6080

Regards,

Bevan





-- 
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] Help in understanding Web Service

2007-02-03 Thread EZRidn
Hello,

I have a need to create a Web Server to answer requests from web browsers.
So I have tried the WebServ example but I am not sure how to send requests
to it. Here is what I tried;

1- Ran the application on my windows XP machine and when I tried to start
the service on port 80 I received an exception stating the address is
already in use. (10048 error)

2- So I tried a different port (6080) and the service started ok.

3- So now from Internet Explorer I tried to connect to the service with the
following 

http://pavallion8000/webserv:6280/

and I received a web page stating ;

Forbidden
You don't have permission to access /webserv:6280/ on this server.

So my problem is I don't really know how to use the web server and would
appreciate if someone could explain to me how I should use it properly.

I may sound somewhat confused, and this is very true at this time.

Thanks

Mike


-- 
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] Help on ICS's HTTP client component

2006-11-11 Thread Francois PIETTE
> So that's the end of it. It's the server that's causing my troubles...

Good to know.

> Is it worth using different time-out's for different stages of
> connection? Ex: use a long timeout for DNS queryes, use shorter timeout
> for the connection itself, use long timeouts for data transmission itself?

There is no general rule. It depends on what your application does.
I use a simple timout, something like 30". I start the timer before doing 
anything and then restart it in each step, including when data is received. 
If the timer triggers, then there was 30" since the last activity, whatever 
it was.

When a timeout is detected, I usually retry 3 times before letting the user 
know. After 3 retries, I just tell the user something goes wrong and he must 
try later. I record detailled errors in the log file but I do not bother the 
user with the details. I just say - like Microsoft - "The service is 
currently unavailable, try later".

--
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


Re: [twsocket] Help on ICS's HTTP client component

2006-11-11 Thread Cosmin Prund
Francois Piette wrote:
> You should always implement timeout. Altough in your particular case, there
> may be a problem somewhere else. 
Good to know! Is there a "magic number" for the default timeout? What 
should we use?
Is it worth using different time-out's for different stages of 
connection? Ex: use a long timeout for DNS queryes, use shorter timeout 
for the connection itself, use long timeouts for data transmission itself?
> I suggest you use a sniffer to see why the
> connection doesn't establish with the webserver (The next state after
> httpDnsLookupDone is the connection). Using a sniffer (I suggest Ethereal,
> link from the links page at ICS website), you'll be able to see if the
> connection request packet is sent by your program and if the reply (positive
> or refused) come back from server. I guess the reply doesn't come back. Once
> we know that information, we'll be able to diagnose further.
>   
I took your advice and I downloaded ethereal, and that (almost) solved 
my problem. I wasn't able to actually get the system to fail while under 
the microscope but I did learn two valuable peaces of information:
(1) I'm not only connecting to the http server on my LAN, I'm also 
connecting to a http server very far away (my site is hosted in New 
York, I live in Romania so it's almost on the other side of the world)
(2) Ethereal showed clear signs of bad connections: duplicate ACK's, 
retransmissions, packets lost!

So that's the end of it. It's the server that's causing my troubles...

Thanks for your help!
Cosmin Prund
-- 
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] Help on ICS's HTTP client component

2006-11-10 Thread Francois Piette
> I did implement a kind of time-out mechanism into my download thing: if
> no event is triggered for a given amount (no state change, no data
> received, no error) I consider the connection to be "timed out". This
> gets my application back on the track working properly but this feels
> like a hack, it doesn't seem to be the right thing to do. Please correct
> me if I'm wrong!

You should always implement timeout. Altough in your particular case, there
may be a problem somewhere else. I suggest you use a sniffer to see why the
connection doesn't establish with the webserver (The next state after
httpDnsLookupDone is the connection). Using a sniffer (I suggest Ethereal,
link from the links page at ICS website), you'll be able to see if the
connection request packet is sent by your program and if the reply (positive
or refused) come back from server. I guess the reply doesn't come back. Once
we know that information, we'll be able to diagnose further.

btw: You may also try to use the same URL and same server with the demo
program HttpTst provided with ICS to see if it happends or not. If it
doesn't happend with HttpTst demo, then it is likely there is something
wrong with your code. If it happend with HttpTst, it is likely a problem of
the webserver, of a security product (firewall, antivirus,...) or maybe you
found a bug (Then trying with V6 beta could be useful since this version has
the latest code available).

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be


- Original Message - 
From: "Cosmin Prund" <[EMAIL PROTECTED]>
To: 
Sent: Friday, November 10, 2006 3:13 PM
Subject: [twsocket] Help on ICS's HTTP client component


> Hello everyone.
>
>
> Note:
> This is a re-post of a message sent to the Talk list, with more detail
> on the problem. This message gets sent the second time to this list too.
>   I sent the first one before receiving elist's subscription
> confirmation so I don't think it went through.
>
> I'm having some trouble using the THttpCli component from the ICS suite.
> I'm using this component to simply download a document off a web site
> (the "document" might be a configuration file or a compressed DLL file
> or whatever). It mostly works but some times it just stops (gets stuck
> in a state - the last OnChangeState message I'm getting is
> httpDnsLookupDone) and then nothing happens. My application's GUI
> doesn't get stuck because Application's message pump is working, but the
> download doesn't finish ether. Or, if something does happen, I know
> nothing about it... Please note I'm using "GetAsync" to get my document.
>
> Extra information:
>
> I'm using the version of ICS marked "[ Download the latest ICS-V5
> Distribution ]" on http://www.overbyte.be/frame_index.html. Is V6 for
> "general consumption"? Should I try that?
> The web server I'm accessing is likely not the cause for this problem as
> the server is an Apache server running on a Windows machine on my LAN.
>
> I did implement a kind of time-out mechanism into my download thing: if
> no event is triggered for a given amount (no state change, no data
> received, no error) I consider the connection to be "timed out". This
> gets my application back on the track working properly but this feels
> like a hack, it doesn't seem to be the right thing to do. Please correct
> me if I'm wrong!
>
> Thanks,
> Cosmin Prund
>
> -- 
> 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] Help on ICS's HTTP client component

2006-11-10 Thread Cosmin Prund
Hello everyone.


Note:
This is a re-post of a message sent to the Talk list, with more detail
on the problem. This message gets sent the second time to this list too. 
  I sent the first one before receiving elist's subscription 
confirmation so I don't think it went through.

I'm having some trouble using the THttpCli component from the ICS suite. 
I'm using this component to simply download a document off a web site 
(the "document" might be a configuration file or a compressed DLL file 
or whatever). It mostly works but some times it just stops (gets stuck 
in a state - the last OnChangeState message I'm getting is 
httpDnsLookupDone) and then nothing happens. My application's GUI 
doesn't get stuck because Application's message pump is working, but the 
download doesn't finish ether. Or, if something does happen, I know 
nothing about it... Please note I'm using "GetAsync" to get my document.

Extra information:

I'm using the version of ICS marked "[ Download the latest ICS-V5
Distribution ]" on http://www.overbyte.be/frame_index.html. Is V6 for
"general consumption"? Should I try that?
The web server I'm accessing is likely not the cause for this problem as
the server is an Apache server running on a Windows machine on my LAN.

I did implement a kind of time-out mechanism into my download thing: if
no event is triggered for a given amount (no state change, no data
received, no error) I consider the connection to be "timed out". This
gets my application back on the track working properly but this feels
like a hack, it doesn't seem to be the right thing to do. Please correct
me if I'm wrong!

Thanks,
Cosmin Prund

-- 
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] Help with SmtpCli

2006-06-18 Thread Arno Garrels
If I understand you correctly transfer hangs. Are you sure that
you pasted the last log lines, wasn't there a line ">."?
Have you tried another SMTP server yet?

---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html 



Jock Terry wrote:
> I have a application that uses ics components for e-mailing a
> customer's purchase orders. The program is written in delphi 7 and
> when originally written worked fine, however the client that I wrote
> it for just started using it and it will not send the attachment that
> goes along with the email. 
> 
> My program and the demo program work, as long as I do not send the
> attachment file.
> 
> I get the same results for my program and for the demo send mail
> program,  MailSnd1.pas. Below is the info from the demo program. The
> ICS component is version 3.0.0.343. I have tried various setting,
> such as changing the default encoding.
> 
> Connecting to SMTP server...
> 220 smtp103.sbc.mail.mud.yahoo.com ESMTP
> < 220 smtp103.sbc.mail.mud.yahoo.com ESMTP
> RequestDone Rq=0 Error=0
> EHLO your_name
>  > EHLO your_name
> 250-smtp103.sbc.mail.mud.yahoo.com
> < 250-smtp103.sbc.mail.mud.yahoo.com
> 250-AUTH LOGIN PLAIN XYMCOOKIE
> < 250-AUTH LOGIN PLAIN XYMCOOKIE
> 250-PIPELINING
> < 250-PIPELINING
> 250 8BITMIME
> < 250 8BITMIME
> RequestDone Rq=10 Error=0
> AUTH LOGIN
>  > AUTH LOGIN
> 334 VXNlcm5hbWU6
> < 334 VXNlcm5hbWU6
> amV0Y29tc3lzQHNiY2dsb2JhbC5uZXQ=
>  > amV0Y29tc3lzQHNiY2dsb2JhbC5uZXQ=
> 334 UGFzc3dvcmQ6
> < 334 UGFzc3dvcmQ6
> amV0NTQ0NA==
>  > amV0NTQ0NA==
> 235 ok, go ahead (#2.0.0)
> < 235 ok, go ahead (#2.0.0)
> RequestDone Rq=11 Error=0
> MAIL FROM:<[EMAIL PROTECTED]>
>  > MAIL FROM:<[EMAIL PROTECTED]>
> 250 ok
> < 250 ok
> RequestDone Rq=2 Error=0
> RCPT TO:<[EMAIL PROTECTED]>
>  > RCPT TO:<[EMAIL PROTECTED]>
> 250 ok
> < 250 ok
> RequestDone Rq=4 Error=0
> DATA
>  > DATA
> 354 go ahead
> < 354 go ahead
>  > From: [EMAIL PROTECTED]
> Comments: This is a test
>  > To: [EMAIL PROTECTED]
>  > Subject: This is the message subject
>  > Sender: [EMAIL PROTECTED]
>  > Mime-Version: 1.0
>  > Content-Type: multipart/mixed;
>   boundary="= Multipart Boundary 0610060418"
>  > Date: Sat, 10 Jun 2006 04:18:06 -0500
>  > X-Priority: 2
>  > Priority: urgent
>  > X-MSMail-Priority: High
>  > Message-ID: <[EMAIL PROTECTED]>
>  > Disposition-Notification-To: [EMAIL PROTECTED]
>  > X-Mailer: ICS SMTP Component V2.50
>  >
>  > This is a multipart MIME message.
>  >
>  > --= Multipart Boundary 0610060418
>  > Content-Type: text/plain; charset="iso-8859-1"
>  > Content-Transfer-Encoding: 7bit
>  >
>  > This is the first line
>  > Then the second one
>  > The next one is empty
>  >
>  > The next one has only a single dot
>  > ..
>  > Finally the last one
>  >
>  > --= Multipart Boundary 0610060418
>  > Content-Type: image/gif;
>  > name="fp_small.gif"
>  > Content-Transfer-Encoding: base64
>  > Content-Disposition: attachment;
>  > filename="fp_small.gif"
>  >
>  >
> R0lGODlhXAB5APf/AP///wgICNbW1t7e3ufn5+/v7/f391JKSjkxMa2UlJyEhNa1tYxzc961  > 
> /9EKpCAJzTC01+0BE5TYFPwDaouaGDxE9Ct1LYdTkElEcFQDZEBtCaDd/IHQpqbMMNMGsiAJ
> RequestDone Rq=5 Error=10004
> 
> Note- I deleted the middle part of the file info. to reduce this
> email. 
> 
> I had to click on abort, after waiting 1 to 2 mins. And that's when I
> got the above winsock error.
> 
> BTW the connection is via DSL and a router.
> 
> Can anyone give me some help as to what is going on or what I am doing
> wrong.
> 
> Thanks for any help given
-- 
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] Help

2006-06-18 Thread Wilfried Mestdagh
Hello Jock,

Please use appropriatic subject. Many people will not even read a
subject without a given content !

> My program and the demo program work, as long as I do not send the
> attachment file.

You dont tell what the problem is. Since you say you get an error after
clicking Abort I assume it seems to take infinity to send the mail. To
check whatis going wrong, download SocketSpy (user made) and 'hang' it
between client and server.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Sunday, June 18, 2006, 16:17, Jock Terry wrote:

> I have a application that uses ics components for e-mailing a customer's
> purchase orders. The program is written in delphi 7 and when originally
> written worked fine, however the client that I wrote it for just started
> using it and it will not send the attachment that goes along with the email.

> My program and the demo program work, as long as I do not send the 
> attachment file.

> I get the same results for my program and for the demo send mail 
> program,  MailSnd1.pas. Below is the info from the demo program. The ICS
> component is version 3.0.0.343. I have tried various setting, such as 
> changing the default encoding.

> Connecting to SMTP server...
> 220 smtp103.sbc.mail.mud.yahoo.com ESMTP
> < 220 smtp103.sbc.mail.mud.yahoo.com ESMTP
> RequestDone Rq=0 Error=0
> EHLO your_name
 >> EHLO your_name
> 250-smtp103.sbc.mail.mud.yahoo.com
> < 250-smtp103.sbc.mail.mud.yahoo.com
> 250-AUTH LOGIN PLAIN XYMCOOKIE
> < 250-AUTH LOGIN PLAIN XYMCOOKIE
> 250-PIPELINING
> < 250-PIPELINING
> 250 8BITMIME
> < 250 8BITMIME
> RequestDone Rq=10 Error=0
> AUTH LOGIN
 >> AUTH LOGIN
> 334 VXNlcm5hbWU6
> < 334 VXNlcm5hbWU6
> amV0Y29tc3lzQHNiY2dsb2JhbC5uZXQ=
 >> amV0Y29tc3lzQHNiY2dsb2JhbC5uZXQ=
> 334 UGFzc3dvcmQ6
> < 334 UGFzc3dvcmQ6
> amV0NTQ0NA==
 >> amV0NTQ0NA==
> 235 ok, go ahead (#2.0.0)
> < 235 ok, go ahead (#2.0.0)
> RequestDone Rq=11 Error=0
> MAIL FROM:<[EMAIL PROTECTED]>
 >> MAIL FROM:<[EMAIL PROTECTED]>
> 250 ok
> < 250 ok
> RequestDone Rq=2 Error=0
> RCPT TO:<[EMAIL PROTECTED]>
 >> RCPT TO:<[EMAIL PROTECTED]>
> 250 ok
> < 250 ok
> RequestDone Rq=4 Error=0
> DATA
 >> DATA
> 354 go ahead
> < 354 go ahead
 >> From: [EMAIL PROTECTED]
> Comments: This is a test
 >> To: [EMAIL PROTECTED]
 >> Subject: This is the message subject
 >> Sender: [EMAIL PROTECTED]
 >> Mime-Version: 1.0
 >> Content-Type: multipart/mixed;
>   boundary="= Multipart Boundary 0610060418"
 >> Date: Sat, 10 Jun 2006 04:18:06 -0500
 >> X-Priority: 2
 >> Priority: urgent
 >> X-MSMail-Priority: High
 >> Message-ID: <[EMAIL PROTECTED]>
 >> Disposition-Notification-To: [EMAIL PROTECTED]
 >> X-Mailer: ICS SMTP Component V2.50
 >>
 >> This is a multipart MIME message.
 >>
 >> --= Multipart Boundary 0610060418
 >> Content-Type: text/plain; charset="iso-8859-1"
 >> Content-Transfer-Encoding: 7bit
 >>
 >> This is the first line
 >> Then the second one
 >> The next one is empty
 >>
 >> The next one has only a single dot
 >> ..
 >> Finally the last one
 >>
 >> --= Multipart Boundary 0610060418
 >> Content-Type: image/gif;
 >> name="fp_small.gif"
 >> Content-Transfer-Encoding: base64
 >> Content-Disposition: attachment;
 >> filename="fp_small.gif"
 >>
 >> R0lGODlhXAB5APf/AP///wgICNbW1t7e3ufn5+/v7/f391JKSjkxMa2UlJyEhNa1tYxzc961
 >> /9EKpCAJzTC01+0BE5TYFPwDaouaGDxE9Ct1LYdTkElEcFQDZEBtCaDd/IHQpqbMMNMGsiAJ
> RequestDone Rq=5 Error=10004

> Note- I deleted the middle part of the file info. to reduce this email.

> I had to click on abort, after waiting 1 to 2 mins. And that's when I 
> got the above winsock error.

> BTW the connection is via DSL and a router.

> Can anyone give me some help as to what is going on or what I am doing
> wrong.

> Thanks for any help given


-- 
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] Help

2006-06-18 Thread Jock Terry
I have a application that uses ics components for e-mailing a customer's 
purchase orders. The program is written in delphi 7 and when originally 
written worked fine, however the client that I wrote it for just started 
using it and it will not send the attachment that goes along with the email.

My program and the demo program work, as long as I do not send the 
attachment file.

I get the same results for my program and for the demo send mail 
program,  MailSnd1.pas. Below is the info from the demo program. The ICS 
component is version 3.0.0.343. I have tried various setting, such as 
changing the default encoding.

Connecting to SMTP server...
220 smtp103.sbc.mail.mud.yahoo.com ESMTP
< 220 smtp103.sbc.mail.mud.yahoo.com ESMTP
RequestDone Rq=0 Error=0
EHLO your_name
 > EHLO your_name
250-smtp103.sbc.mail.mud.yahoo.com
< 250-smtp103.sbc.mail.mud.yahoo.com
250-AUTH LOGIN PLAIN XYMCOOKIE
< 250-AUTH LOGIN PLAIN XYMCOOKIE
250-PIPELINING
< 250-PIPELINING
250 8BITMIME
< 250 8BITMIME
RequestDone Rq=10 Error=0
AUTH LOGIN
 > AUTH LOGIN
334 VXNlcm5hbWU6
< 334 VXNlcm5hbWU6
amV0Y29tc3lzQHNiY2dsb2JhbC5uZXQ=
 > amV0Y29tc3lzQHNiY2dsb2JhbC5uZXQ=
334 UGFzc3dvcmQ6
< 334 UGFzc3dvcmQ6
amV0NTQ0NA==
 > amV0NTQ0NA==
235 ok, go ahead (#2.0.0)
< 235 ok, go ahead (#2.0.0)
RequestDone Rq=11 Error=0
MAIL FROM:<[EMAIL PROTECTED]>
 > MAIL FROM:<[EMAIL PROTECTED]>
250 ok
< 250 ok
RequestDone Rq=2 Error=0
RCPT TO:<[EMAIL PROTECTED]>
 > RCPT TO:<[EMAIL PROTECTED]>
250 ok
< 250 ok
RequestDone Rq=4 Error=0
DATA
 > DATA
354 go ahead
< 354 go ahead
 > From: [EMAIL PROTECTED]
Comments: This is a test
 > To: [EMAIL PROTECTED]
 > Subject: This is the message subject
 > Sender: [EMAIL PROTECTED]
 > Mime-Version: 1.0
 > Content-Type: multipart/mixed;
  boundary="= Multipart Boundary 0610060418"
 > Date: Sat, 10 Jun 2006 04:18:06 -0500
 > X-Priority: 2
 > Priority: urgent
 > X-MSMail-Priority: High
 > Message-ID: <[EMAIL PROTECTED]>
 > Disposition-Notification-To: [EMAIL PROTECTED]
 > X-Mailer: ICS SMTP Component V2.50
 >
 > This is a multipart MIME message.
 >
 > --= Multipart Boundary 0610060418
 > Content-Type: text/plain; charset="iso-8859-1"
 > Content-Transfer-Encoding: 7bit
 >
 > This is the first line
 > Then the second one
 > The next one is empty
 >
 > The next one has only a single dot
 > ..
 > Finally the last one
 >
 > --= Multipart Boundary 0610060418
 > Content-Type: image/gif;
 > name="fp_small.gif"
 > Content-Transfer-Encoding: base64
 > Content-Disposition: attachment;
 > filename="fp_small.gif"
 >
 > R0lGODlhXAB5APf/AP///wgICNbW1t7e3ufn5+/v7/f391JKSjkxMa2UlJyEhNa1tYxzc961
 > /9EKpCAJzTC01+0BE5TYFPwDaouaGDxE9Ct1LYdTkElEcFQDZEBtCaDd/IHQpqbMMNMGsiAJ
RequestDone Rq=5 Error=10004

Note- I deleted the middle part of the file info. to reduce this email.

I had to click on abort, after waiting 1 to 2 mins. And that's when I 
got the above winsock error.

BTW the connection is via DSL and a router.

Can anyone give me some help as to what is going on or what I am doing 
wrong.

Thanks for any help given

-- 
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] Help file for FTPClient

2006-06-02 Thread Borosnyay Péter
> Why not make it compatible with RFC959 and return the correct response for
> the commands ?

Because we are in a hurry, and the colleague who wrote the microcontroller 
program didn't check the RFC, just picked a code whose description was best 
matching the situation. It is definitely an error. I will notify the colleague 
of this.
Thanks for giving information.

Peter

>
> --
> 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


Re: [twsocket] Help file for FTPClient

2006-06-01 Thread Francois PIETTE
>   ICS is professional. At least its FtpCLient is. Absolutely logical 
> structure and functionality.

Thanks for your favorable opinion.

> I don't know if some other PC FTP servers also send response 225 for
> STOR and RETR, but the previous FTP components
> I tried have accepted 225 by hand.

Response code 225 is not among STOR and RETR response as per RFC959. Code 
225 is only given for ABOR command.

> It's our company's own development.

Why not make it compatible with RFC959 and return the correct response for 
the commands ?

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be



- Original Message - 
From: "Borosnyay Péter" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, June 01, 2006 5:26 PM
Subject: Re: [twsocket] Help file for FTPClient


> Hi guys,
>
>   ICS is professional. At least its FtpCLient is. Absolutely logical 
> structure and functionality.
> I have successfully modified FtpCli.pas to accept response code 225 for 
> STOR and RETR. It was easy to find the corresponding Next2PutAsync and 
> Next2GetAsync procedures.
> This was needed because I communicate with a special custom engineered ARM 
> microcontroller driven hardware device. It is an onboard navigation 
> computer for public transport vehicles. It's our company's own 
> development. It uses GPS, GPRS, TCP, FTP protocols. If anybody is 
> interested in what we're doing, please contact me in a private mail.
>
> I don't know if some other PC FTP servers also send response 225 for STOR 
> and RETR, but the previous FTP components I tried have accepted 225 by 
> hand.
>
> Francois, if we get adequate information that FTP servers that send this 
> code do exist, please consider this mail as a modification suggestion.
>
> 225 Data connection open; no transfer in progress.
> I have decided to use FtpCli and ICS as widely as possible.
>
>
> Cheers,
>
> Peter Borosnyay
> Pécs, Hungary
>
>
> ps. notify me if no line breaks are uncomfortable.
>
> On Tue, 30 May 2006 21:54:42 +0200, Wilfried Mestdagh 
> <[EMAIL PROTECTED]> wrote:
>
>> Hello Peter,
>>
>>> being the final component I choose for my communications program
>>
>> Good I hope you succeed ! If you have any questions you can fire this
>> off in this mailing list. Lots of people are volonteer to standby...
>>
>>> At least I plan to do so.
>>
>> Keep in touch :)
>>
>> ---
>> Rgds, Wilfried [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> http://www.mestdagh.biz
>>
>> Tuesday, May 30, 2006, 18:14, Borosnyay Péter wrote:
>>
>>> Hello Wilfried,
>>
>>> I dl'ed ICS today morning so I'm not in the position to help yet ...
>>> But I will experiment with it this week, it has a good chance of
>>> being the final component I choose for my communications program in
>>> our GPS navigation system at the local transport company of the second
>>> biggest city in Hungary.
>>> If I succeed and get my money I will either donate or do something 
>>> useful for you.
>>> At least I plan to do so.
>>
>>> Bests,
>>> Peter
>>
>>> On Tue, 30 May 2006 15:18:06 +0200, Wilfried Mestdagh 
>>> <[EMAIL PROTECTED]> wrote:
>>
>
> -- 
> 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] Help file for FTPClient

2006-06-01 Thread Borosnyay Péter
Hi guys,

   ICS is professional. At least its FtpCLient is. Absolutely logical structure 
and functionality.
I have successfully modified FtpCli.pas to accept response code 225 for STOR 
and RETR. It was easy to find the corresponding Next2PutAsync and Next2GetAsync 
procedures.
This was needed because I communicate with a special custom engineered ARM 
microcontroller driven hardware device. It is an onboard navigation computer 
for public transport vehicles. It's our company's own development. It uses GPS, 
GPRS, TCP, FTP protocols. If anybody is interested in what we're doing, please 
contact me in a private mail.

I don't know if some other PC FTP servers also send response 225 for STOR and 
RETR, but the previous FTP components I tried have accepted 225 by hand.

Francois, if we get adequate information that FTP servers that send this code 
do exist, please consider this mail as a modification suggestion.

225 Data connection open; no transfer in progress.
I have decided to use FtpCli and ICS as widely as possible.


Cheers,

Peter Borosnyay
Pécs, Hungary


ps. notify me if no line breaks are uncomfortable.

On Tue, 30 May 2006 21:54:42 +0200, Wilfried Mestdagh <[EMAIL PROTECTED]> wrote:

> Hello Peter,
>
>> being the final component I choose for my communications program
>
> Good I hope you succeed ! If you have any questions you can fire this
> off in this mailing list. Lots of people are volonteer to standby...
>
>> At least I plan to do so.
>
> Keep in touch :)
>
> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz
>
> Tuesday, May 30, 2006, 18:14, Borosnyay Péter wrote:
>
>> Hello Wilfried,
>
>> I dl'ed ICS today morning so I'm not in the position to help yet ...
>> But I will experiment with it this week, it has a good chance of
>> being the final component I choose for my communications program in
>> our GPS navigation system at the local transport company of the second
>> biggest city in Hungary.
>> If I succeed and get my money I will either donate or do something useful 
>> for you.
>> At least I plan to do so.
>
>> Bests,
>> Peter
>
>> On Tue, 30 May 2006 15:18:06 +0200, Wilfried Mestdagh <[EMAIL PROTECTED]> 
>> wrote:
>

-- 
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] Help file for FTPClient

2006-05-30 Thread Wilfried Mestdagh
Hello Peter,

> being the final component I choose for my communications program

Good I hope you succeed ! If you have any questions you can fire this
off in this mailing list. Lots of people are volonteer to standby...

> At least I plan to do so.

Keep in touch :)

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, May 30, 2006, 18:14, Borosnyay Péter wrote:

> Hello Wilfried,

> I dl'ed ICS today morning so I'm not in the position to help yet ...
> But I will experiment with it this week, it has a good chance of
> being the final component I choose for my communications program in
> our GPS navigation system at the local transport company of the second
> biggest city in Hungary.
> If I succeed and get my money I will either donate or do something useful for 
> you.
> At least I plan to do so.

> Bests,
> Peter

> On Tue, 30 May 2006 15:18:06 +0200, Wilfried Mestdagh <[EMAIL PROTECTED]> 
> wrote:

>> Hello Peter,
>>
>> Correct. There is already some framework on http://wiki.overbyte.be but
>> all still need to be done. You are of course welcome to help :) And also
>> this is the best learning tool ever exists :)
>>
>> ---
>> Rgds, Wilfried [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> http://www.mestdagh.biz
>>
>> Tuesday, May 30, 2006, 14:13, Borosnyay Péter wrote:
>>
>>> Hello everybody,
>>
>>>I couldn't find help files for FTPClient (I mean the
>>> descriptions of properties, events and methods) neither in the
>>> package, nor on overbyte.be and in the faq. Help is probably not
>>> available yet.
>>
>>> Am I right ?
>>
>>> Cheers,
>>> Peter
>>
>>



> -- 
> FIGYELEM !  Ennek a levélnek a végén NINCS REKLÁM !!!
> észrevetted ?


-- 
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] Help file for FTPClient

2006-05-30 Thread Borosnyay Péter
Hello Wilfried,

I dl'ed ICS today morning so I'm not in the position to help yet ...
But I will experiment with it this week, it has a good chance of being the 
final component I choose for my communications program in our GPS navigation 
system at the local transport company of the second biggest city in Hungary.
If I succeed and get my money I will either donate or do something useful for 
you.
At least I plan to do so.

Bests,
Peter

On Tue, 30 May 2006 15:18:06 +0200, Wilfried Mestdagh <[EMAIL PROTECTED]> wrote:

> Hello Peter,
>
> Correct. There is already some framework on http://wiki.overbyte.be but
> all still need to be done. You are of course welcome to help :) And also
> this is the best learning tool ever exists :)
>
> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz
>
> Tuesday, May 30, 2006, 14:13, Borosnyay Péter wrote:
>
>> Hello everybody,
>
>>I couldn't find help files for FTPClient (I mean the
>> descriptions of properties, events and methods) neither in the
>> package, nor on overbyte.be and in the faq. Help is probably not
>> available yet.
>
>> Am I right ?
>
>> Cheers,
>> Peter
>
>



-- 
FIGYELEM !  Ennek a levélnek a végén NINCS REKLÁM !!!
észrevetted ?

-- 
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] Help file for FTPClient

2006-05-30 Thread Francois Piette
>I couldn't find help files for FTPClient (I mean the descriptions of
properties,
> events and methods) neither in the package, nor on overbyte.be and in the
faq.
> Help is probably not available yet.
> Am I right ?

Almost. See the source code (component and sample program). You'll find
valuable help in the comments and of course you'll find all properties,
methods and events. I always use significant names so you should not have
too much difficulties.
--
Contribute to the SSL Effort.
Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
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] Help file for FTPClient

2006-05-30 Thread Wilfried Mestdagh
Hello Peter,

Correct. There is already some framework on http://wiki.overbyte.be but
all still need to be done. You are of course welcome to help :) And also
this is the best learning tool ever exists :)

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Tuesday, May 30, 2006, 14:13, Borosnyay Péter wrote:

> Hello everybody,

>I couldn't find help files for FTPClient (I mean the
> descriptions of properties, events and methods) neither in the
> package, nor on overbyte.be and in the faq. Help is probably not
> available yet.

> Am I right ?

> Cheers,
> Peter


-- 
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] Help file for FTPClient

2006-05-30 Thread Borosnyay Péter
Hello everybody,

   I couldn't find help files for FTPClient (I mean the descriptions of 
properties, events and methods) neither in the package, nor on overbyte.be and 
in the faq. Help is probably not available yet.

Am I right ?

Cheers,
Peter

-- 
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] [HELP] THttpServer

2006-04-11 Thread Guillaume MAISON
Francois PIETTE a écrit :
>> Yop ! it works ! Thanks a lot François !
> 
> I don't know your application, but maybe the template feature would be 
> interesting for you. It is very powerful. For a demo, see 
> TWebServForm.CreateVirtualDocument_Template.
> 
> The principle is simple: you prvide a HTML template with special tags. Those 
> tags are replaced by values computed by your program. This way you can 
> separate presentation (the HTML) from the code which produce data values. 
> Very powerful and easy to use.

The thing is that i'm not using the webserver as a "HTML provider" but much 
more like a HTTP provider.
I'm sending and getting back XML files using a http server.

i needed a convenient way to do the following :
the client part of my application needs to send xml request. Some requests are 
sent through the internet to a PHP/MySQL http 
server that sends back a xml result.

The thing is that this application might be run also in a "standalone" mode. 
that's why, instead of having several client 
interface, i have added to the client application a small http server that is 
used to handle all the requests...

much easier way to proceed :)

but thanks for the hint !

-- 

Guillaume MAISON
eXpress Network Agen - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : +33 5 53 87 91 48
Mobile  : +33 6 30 14 91 23
Fax : +33 5 53 68 73 50
e-mail  : [EMAIL PROTECTED]
Web : http://nauteus.com

Mon Profil sur Viaduc: 
http://www.viaduc.com/public/profil/?memberId=0021oz963uuea795
Vous inscrire sur Viaduc : 
http://www.viaduc.com/invitationpersonnelle/0021oz963uuea795
-- 
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] [HELP] THttpServer

2006-04-11 Thread Francois PIETTE
>>> do i have to do like :
>>> ClientCnx.AnswerStream();
>>> ClientCnx.Docstream:=;
>>> ClientCnx.SendStream;
>>
>> Forget anbout the two last lines !
>> Have a look at THttpConnection.AnswerStream and you'll understand.
>
> Yop ! it works ! Thanks a lot François !

I don't know your application, but maybe the template feature would be 
interesting for you. It is very powerful. For a demo, see 
TWebServForm.CreateVirtualDocument_Template.

The principle is simple: you prvide a HTML template with special tags. Those 
tags are replaced by values computed by your program. This way you can 
separate presentation (the HTML) from the code which produce data values. 
Very powerful and easy to use.

--
[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


Re: [twsocket] [HELP] THttpServer

2006-04-11 Thread Guillaume MAISON
Francois PIETTE a écrit :
>> do i have to do like :
>> ClientCnx.AnswerStream();
>> ClientCnx.Docstream:=;
>> ClientCnx.SendStream;
> 
> Forget anbout the two last lines !
> Have a look at THttpConnection.AnswerStream and you'll understand.

Yop ! it works ! Thanks a lot François !

regards,

-- 

Guillaume MAISON
eXpress Network Agen - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : +33 5 53 87 91 48
Mobile  : +33 6 30 14 91 23
Fax : +33 5 53 68 73 50
e-mail  : [EMAIL PROTECTED]
Web : http://nauteus.com

Mon Profil sur Viaduc: 
http://www.viaduc.com/public/profil/?memberId=0021oz963uuea795
Vous inscrire sur Viaduc : 
http://www.viaduc.com/invitationpersonnelle/0021oz963uuea795
-- 
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] [HELP] THttpServer

2006-04-11 Thread Francois PIETTE
> do i have to do like :
> ClientCnx.AnswerStream();
> ClientCnx.Docstream:=;
> ClientCnx.SendStream;

Forget anbout the two last lines !
Have a look at THttpConnection.AnswerStream and you'll understand.

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be



- Original Message - 
From: "Guillaume MAISON" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Tuesday, April 11, 2006 6:21 PM
Subject: [twsocket] [HELP] THttpServer


> Hi guys,
>
> i must be blind at this time but i don't know how to send back the content 
> of a stream.
>
> i explain :
> i receive a http request with posted data. everything runs fine, i can 
> have the posted content and analyze it, process it
> and then at the stage of returning the resulting stream... i don't know 
> how to do it...
>
> do i have to do like :
> ClientCnx.AnswerStream();
> ClientCnx.Docstream:=;
> ClientCnx.SendStream;
>
> 
>
> thanks in advance for your help !
>
> -- 
>
> Guillaume MAISON
> eXpress Network Agen - [EMAIL PROTECTED]
> 83, Cours Victor Hugo
> 47000 AGEN
> Tél : +33 5 53 87 91 48
> Mobile  : +33 6 30 14 91 23
> Fax : +33 5 53 68 73 50
> e-mail  : [EMAIL PROTECTED]
> Web : http://nauteus.com
>
> Mon Profil sur Viaduc: 
> http://www.viaduc.com/public/profil/?memberId=0021oz963uuea795
> Vous inscrire sur Viaduc : 
> http://www.viaduc.com/invitationpersonnelle/0021oz963uuea795
> -- 
> 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] [HELP] THttpServer

2006-04-11 Thread Guillaume MAISON
Hi guys,

i must be blind at this time but i don't know how to send back the content of a 
stream.

i explain :
i receive a http request with posted data. everything runs fine, i can have the 
posted content and analyze it, process it
and then at the stage of returning the resulting stream... i don't know how to 
do it...

do i have to do like :
ClientCnx.AnswerStream();
ClientCnx.Docstream:=;
ClientCnx.SendStream;



thanks in advance for your help !

-- 

Guillaume MAISON
eXpress Network Agen - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : +33 5 53 87 91 48
Mobile  : +33 6 30 14 91 23
Fax : +33 5 53 68 73 50
e-mail  : [EMAIL PROTECTED]
Web : http://nauteus.com

Mon Profil sur Viaduc: 
http://www.viaduc.com/public/profil/?memberId=0021oz963uuea795
Vous inscrire sur Viaduc : 
http://www.viaduc.com/invitationpersonnelle/0021oz963uuea795
-- 
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] Help to retrieve datetime from sntp server

2006-03-09 Thread Xavier Mor-Mur
Thanks Angus for your  quick reply.
I download your component and will check it.

Best regards
Xavier

En/na Angus Robertson - Magenta Systems Ltd ha escrit:
>> I need write o function to retrieve date-time from a timeservers.
>> This is needed to prevent changes on date and/or time on local 
>> network pc's, included local server, because I should upload/download 
>> small files which need real date time assigned.
>>
>> I take a look to TWSTimeClient from Chris Barber found at usermade 
>> page, but I can't get write a working program.
>> 
>
> That client did not support SNTP, only the old time protocol that uses 
> whole seconds and does not allow for the round trip time.  I updated it 
> many years ago for SNTP and to add UTC functions to change the PC time.  
>
> I also updated Nathan Anderson's time server component to support SNTP. 
>
> You can download both from my ICS page:  
>
> http://www.magsys.co.uk/delphi/magics.asp
>
> Sorry, there is no demo program, but I use them myself hourly in my DUN 
> Manager application.  I strongly recommend you compare the results of 
> two time servers before actually changing the PC time, you'd be 
> surprised how often time servers return bad time. 
>
> 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] Help to retrieve datetime from sntp server

2006-03-08 Thread Angus Robertson - Magenta Systems Ltd
> I need write o function to retrieve date-time from a timeservers.
> This is needed to prevent changes on date and/or time on local 
> network pc's, included local server, because I should upload/download 
> small files which need real date time assigned.
> 
> I take a look to TWSTimeClient from Chris Barber found at usermade 
> page, but I can't get write a working program.

That client did not support SNTP, only the old time protocol that uses 
whole seconds and does not allow for the round trip time.  I updated it 
many years ago for SNTP and to add UTC functions to change the PC time.  

I also updated Nathan Anderson's time server component to support SNTP. 

You can download both from my ICS page:  

http://www.magsys.co.uk/delphi/magics.asp

Sorry, there is no demo program, but I use them myself hourly in my DUN 
Manager application.  I strongly recommend you compare the results of 
two time servers before actually changing the PC time, you'd be 
surprised how often time servers return bad time. 

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


[twsocket] Help to retrieve datetime from sntp server

2006-03-08 Thread Xavier Mor-Mur
Hi to All

I need a little bit help.
I need write o function to retrieve date-time from a timeservers.
This is needed to prevent changes on date and/or time on local network 
pc's, included local server, because I should upload/download small 
files which need real date time assigned.

I take a look to TWSTimeClient from Chris Barber found at usermade page, 
but I can't get write a working program.
Program I write access to internet, firewall detects it, but don't get 
anything.

I would appreciate any help and if possible  small project  showing what 
to do.
Thanks in advance.

Xavier

-- 
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] [HELP] Question...

2006-02-21 Thread Guillaume MAISON
Arno Garrels a écrit :
> Guillaume MAISON wrote:
>> In that case, the property SocksLevel should be initialized at the
>> component creation with a value. Which is not the case in the 
>> source code... As i've not changed my code...
> 
> Strange I don't have that problem. It is assigned default value '5'
> in both V5 and V6 see WSocket.pas and OverbyteIcsWSocket.
> 
> procedure TCustomSocksWSocket.AssignDefaultValue;
> begin
> inherited AssignDefaultValue;
> ...
> FSocksLevel  := '5';
> 
> Arno

Well, the problem comes from HttpProt (1768) in the THttpCli.DoBeforeConnect 
procedure.

procedure THttpCli.DoBeforeConnect;
begin
 FCtrlSocket.Addr:= FDnsResult;
 FCtrlSocket.LocalAddr   := FLocalAddr; {bb}
 FCtrlSocket.Port:= FPort;
 FCtrlSocket.Proto   := 'tcp';
 FCtrlSocket.SocksServer := FSocksServer; *<-- Here where 
THttpCli.FSocksServer is set by default to ''*
 FCtrlSocket.SocksLevel  := FSocksLevel;
 FCtrlSocket.SocksPort   := FSocksPort;
 FCtrlSocket.SocksUsercode   := FSocksUsercode;
 FCtrlSocket.SocksPassword   := FSocksPassword;
 FCtrlSocket.SocksAuthentication := FSocksAuthentication;
end;

Is it a bug ? Is it a plane ? no, it's superman ;)

-- 

Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

-- 
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] [HELP] Question...

2006-02-20 Thread Arno Garrels
Guillaume MAISON wrote:
> Arno Garrels a écrit :
>> Guillaume MAISON wrote:
>>> And, effectively, the NewValue is '', as i don't need it
>> 
>> Whether to use or not to use Socks is specified via property
>> SocksAuthentication, in your case socksNoAuthentication, property
>> SocksLevel may not be empty. 
>> 
> In that case, the property SocksLevel should be initialized at the
> component creation with a value. Which is not the case in the 
> source code... As i've not changed my code...

Strange I don't have that problem. It is assigned default value '5'
in both V5 and V6 see WSocket.pas and OverbyteIcsWSocket.

procedure TCustomSocksWSocket.AssignDefaultValue;
begin
inherited AssignDefaultValue;
...
FSocksLevel  := '5';

Arno

> 
> --
> 
> Guillaume MAISON - [EMAIL PROTECTED]
> 83, Cours Victor Hugo
> 47000 AGEN
> Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
> e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com
-- 
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] [HELP] Question...

2006-02-20 Thread Guillaume MAISON
Arno Garrels a écrit :
> Guillaume MAISON wrote:
>> And, effectively, the NewValue is '', as i don't need it
> 
> Whether to use or not to use Socks is specified via property 
> SocksAuthentication,
> in your case socksNoAuthentication, property SocksLevel may not be empty.
> 
In that case, the property SocksLevel should be initialized at the component 
creation with a value. Which is not the case in the 
source code... As i've not changed my code...

-- 

Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

-- 
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] [HELP] Question...

2006-02-20 Thread Arno Garrels
Guillaume MAISON wrote:
> 
> And, effectively, the NewValue is '', as i don't need it

Whether to use or not to use Socks is specified via property 
SocksAuthentication,
in your case socksNoAuthentication, property SocksLevel may not be empty.

Arno

> Any clue someone ?
> 
> --
> 
> Guillaume MAISON - [EMAIL PROTECTED]
> 83, Cours Victor Hugo
> 47000 AGEN
> Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
> e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com
-- 
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] [HELP] Question...

2006-02-20 Thread Guillaume MAISON
hi all ICS gurus ;)

i've installed latest ICS beta version from Overbyte website.

i've changed nothing to my code and now, using a THttpCli, it triggers an error 
though before it wasn't.
Here's what i'm doing :
First i create a THttpCli and do the following assignments :

 FHttpLayer := THttpCli.Create(nil);
 FHttpLayer.RequestVer := '1.1';

 FHttpLayer.OnTrace := Self.ProcHttpTrace;

 FHttpLayer.OnSocketError := Self.ProcHttpSocketError;
 FHttpLayer.OnRequestDone := Self.ProcHttpRequestDone;
 FHttpLayer.OnSessionConnected := Self.ProcHttpSessionConnected;
 FHttpLayer.OnSessionClosed := Self.ProcHttpSessionClosed;
 FHttpLayer.OnHeaderData := Self.ProcHttpHeaderData;
 FHttpLayer.OnCommand := Self.ProcHttpCommand;
 FHttpLayer.OnHeaderBegin := Self.ProcHttpHeaderBegin;
 FHttpLayer.OnHeaderEnd := Self.ProcHttpHeaderEnd;
 FHttpLayer.OnRequestHeaderBegin := Self.ProcHttpRequestHeaderBegin;
 FHttpLayer.OnRequestHeaderEnd := Self.ProcHttpRequestHeaderEnd;
 FHttpLayer.OnDocBegin := Self.ProcHttpDocBegin;
 FHttpLayer.OnDocData := Self.ProcHttpDocData;
 FHttpLayer.OnDocEnd := Self.ProcHttpDocEnd;
 FHttpLayer.OnSendBegin := Self.ProcHttpSendBegin;
 FHttpLayer.OnSendData := Self.ProcHttpSendData;
 FHttpLayer.OnSendEnd := Self.ProcHttpSendEnd;
 FHttpLayer.OnStateChange := Self.ProcHttpStateChange;
 FHttpLayer.OnLocationChange := Self.ProcHttpLocationChange;
 FHttpLayer.OnCookie := Self.ProcHttpCookie;
 FHttpLayer.OnDataPush := Self.ProcHttpDataPush;
 FHttpLayer.OnDataPush2 := Self.ProcHttpDataPush2;
 FHttpLayer.OnSocksConnected := Self.ProcHttpSocksConnected;
 FHttpLayer.OnSocksAuthState := Self.ProcHttpSocksAuthState;
 FHttpLayer.OnSocksError := Self.ProcHttpSocksError;
 FHttpLayer.OnBeforeHeaderSend := Self.ProcHttpBeforeHeaderSend;

(it's just the first time it hurts and your eyes are crying ;) )

Then i cuild all my HttpRequest with the correct URL, etc... and do :
 FHttpLayer.PostASync;

And, this is the strangest part, i have the ProcHttpSocketError which is 
triggered, due to an exception which is in WSocket :

procedure TCustomSocksWSocket.SetSocksLevel(newValue : String);
begin
 if State <> wsClosed then begin
 RaiseException('Can''t change socks level if not closed');
 Exit;
 end;
 if (newValue <> '4')  and (newValue <> '5') and
(newValue <> '4A') and (newValue <> '4a') then begin
 *This one is triggered* --> RaiseException('Invalid socks level. Must 
be 4, 4A or 5.');
 Exit;
 end;
 FSocksLevel := UpperCase(newValue);
end;

And, effectively, the NewValue is '', as i don't need it

Any clue someone ?

-- 

Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

-- 
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] Help Files ?

2005-11-19 Thread Francois PIETTE
> I have succesfully managed a test version with your
> FTP component by refering to your examples.
> Thank You.
> I have been hunting for the Help files to get a deeper
> insight of the components but could not find them, can
> you help ?

There is not up to date help file available.
The best help is in the source code: the component source code and the 
samples source code. You can easily find all the properties, events and 
method in the component source code. Most names are self explanatory. There 
are also a lot of comments.

Then if it is not enough, you have a FAQ and a support mailing list with 
searchable archive. See "support" link at my website.

This being said, we are still looking for someone to make a good help file. 
Various project has been started in the past but none was ever finished :-(

--
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


[twsocket] Help Files ?

2005-11-18 Thread Allan Fernandes
Hi ,

I had previously asked:
> My program needs to copy large files (1GB etc.)
across a LAN.

Your advice was:
> The simplest solution is to use ICS FTP...

I have succesfully managed a test version with your
FTP component by refering to your examples.
Thank You.
I have been hunting for the Help files to get a deeper
insight of the components but could not find them, can
you help ?

Regards
Allan







___ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
-- 
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] [HELP] Question about starting THttpServer and TFtpServer

2005-11-09 Thread Guillaume MAISON
Angus Robertson - Magenta Systems Ltd a écrit :
>>are the Start procedures, from ThttpServer and TFtpServer, blocking 
>>procedures or not ?
> 
> 
> No, they just set the server to listen for incoming sessions.
> 
> Angus

Thanks to both !

Best regards,

-- 

Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

-- 
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] [HELP] Question about starting THttpServer and TFtpServer

2005-11-09 Thread Angus Robertson - Magenta Systems Ltd
> are the Start procedures, from ThttpServer and TFtpServer, blocking 
> procedures or not ?

No, they just set the server to listen for incoming sessions.

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] [HELP] Question about starting THttpServer and TFtpServer

2005-11-09 Thread Fastream Technologies
Hello Guillaume,

They start the server immediately however the server needs a message pump to 
work.

Best Regards,

SubZ

- Original Message - 
From: "Guillaume MAISON" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Wednesday, November 09, 2005 5:25 PM
Subject: [twsocket] [HELP] Question about starting THttpServer and 
TFtpServer


Hi everyone,

Just a small question which answer should be short ;) :

are the Start procedures, from ThttpServer and TFtpServer, blocking
procedures or not ?

Thanks in advance !

-- 

Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

-- 
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] [HELP] Question about starting THttpServer and TFtpServer

2005-11-09 Thread Guillaume MAISON
Hi everyone,

Just a small question which answer should be short ;) :

are the Start procedures, from ThttpServer and TFtpServer, blocking 
procedures or not ?

Thanks in advance !

-- 

Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

-- 
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] Help

2005-09-23 Thread Carlos Oliveira
Hi,

Im trying to use the SocksTst project to connect via Socks 5, and although
the connection is successfull, i am unable to
send data from one client to another.

Im running two instances of the Sockstst with the following parameters
TargetHostname: 863965e5a89fed0b9aeeab809733b3ef234aa835
TargetPort: 0
SocksServer:10.134.15.54
SocksPort:  21080

And when i run the following line of code in one of them:
WSocket1.SendLine('Hello World');
although the other instance triggers the OnDataAvailable event, the
FRcvBuf comes completely empty.

Am i doing anything wrong?

Thank you for you attention

Carlos Oliveira
-- 
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] [HELP] HttpCli and Upload files... FORGET MY MAIL ; )

2005-07-26 Thread Francois PIETTE
> that's something i haven't found anywhere on the net ?

Maybe in the documents related to MIME ?

--
[EMAIL PROTECTED]
http://www.overbyte.be


- Original Message - 
From: "Guillaume MAISON" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Tuesday, July 26, 2005 4:39 PM
Subject: Re: [twsocket] [HELP] HttpCli and Upload files... FORGET MY MAIL 
; )


>> Hi everyone,
>>
>> I want to send some files using ThttpCli and the Post Method.
>> i've searched through the ML for code samples, etc...
>>
>> Based upon what i've found, here's the code i've written (based upon 
>> ICS's httpPost example) :
>>
>
> Right right right...
>
> as usual, i need to pollute the ML just before finding myself the 
> solution...
>
> i'm desperatly sorry for the inconvenience...
>
> if anyone here comes by AGEN in France, i'd greatly offer a drink ;)
> well not all at the same time uh ?
>
> anyway, just a small question to end :
>
> where is it mentionned that when you define a boundary,
> the http header
> Content-type: multipart/form-data; boundary=-boundary
> needs two -- less than the boundaries mentioned in the data after ?
>
> that's something i haven't found anywhere on the net ?
>
> Thanks !
>
> Best regards,
>
> Guillaume MAISON
> -
> Guillaume MAISON - [EMAIL PROTECTED]
> 83, Cours Victor Hugo
> 47000 AGEN
> Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
> e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com
>
> -- 
> 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] [HELP] HttpCli and Upload files...

2005-07-26 Thread Francois Piette
> with the sample code above, the apache/php server doesn't see any
> POST data with firefox it does...
> although i don't see any difference...
> anyone any idea ?

Cookie expected by the Apache server ?

--
[EMAIL PROTECTED]
http://www.overbyte.be

- Original Message - 
From: "Guillaume MAISON" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, July 26, 2005 4:25 PM
Subject: [twsocket] [HELP] HttpCli and Upload files...


> Hi everyone,
>
> I want to send some files using ThttpCli and the Post Method.
> i've searched through the ML for code samples, etc...
>
> Based upon what i've found, here's the code i've written (based upon ICS's 
> httpPost example) :
>
> procedure THttpPostForm.PostButtonClick(Sender: TObject);
> var
> Data : String;
> crlf : String;
> lFs : TMemoryStream;
> lBoundary:string;
> begin
>  crlf:=#13#10;
>  lBoundary:='---01myboundary2';
>  HttpCli1.ContentTypePost:='multipart/form-data; boundary='+lBoundary;
>
>  Data:=lBoundary+#13#10;
>  Data:=Data+'Content-Disposition: form-data; 
> name="FirstName"'#13#10#13#10;
>  Data:=Data+Trim(FirstNameEdit.Text)+#13#10;
>  Data:=Data+lBoundary+#13#10;
>  Data:=Data+'Content-Disposition: form-data; name="LastName"'#13#10#13#10;
>  Data:=Data+Trim(LastNameEdit.Text)+#13#10;
>  Data:=Data+lBoundary+#13#10;
>  Data:=Data+'Content-Disposition: form-data; name="Submit"'#13#10#13#10;
>  Data:=Data+'Submit'+#13#10;
>
>
> {Data := 'FirstName=' + UrlEncode(Trim(FirstNameEdit.Text)) + '&' +
> 'LastName='  + UrlEncode(Trim(LastNameEdit.Text))  + '&' +
> 'Submit=Submit';}
> HttpCli1.SendStream := TMemoryStream.Create;
> HttpCli1.SendStream.Write(Data[1], Length(Data));
> if ffileName<>'' then
> Begin
>  lFs:=TMemoryStream.Create;
>  lFs.LoadFromFile(fFileName);
>  Data:=lBoundary+#13#10;
>  Data:=Data+'Content-Disposition: form-data; name="monfichier";
filename="'+fFileName+'"'+crlf;
>  Data:=Data+'Content-type: application/zip'+crlf+crlf;
>  HttpCli1.SendStream.Write(Data[1], Length(Data));
>  lFs.SaveToStream(HttpCli1.SendStream);
>  HttpCli1.SendStream.Write(crlf[1], Length(crlf));
> End;
> Data:=lBoundary+'--'+crlf;
> HttpCli1.SendStream.Write(Data[1], length(data));
> HttpCli1.SendStream.Seek(0, 0);
> HttpCli1.RcvdStream := TMemoryStream.Create;
> HttpCli1.URL := Trim(ActionURLEdit.Text);
> HttpCli1.PostAsync;
> end;
>
> using the WebServ application, here's what the c:\data.bin file says :
> DATA
> Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
> Content-Type: multipart/form-data; 
> boundary=---01myboundary2
> User-Agent: Mozilla/4.0 (compatible; ICS)
> Host: localhost:8080
> Content-Length: 349
> ---01myboundary2
> Content-Disposition: form-data; name="FirstName"
>
> Guillaume
> ---01myboundary2
> Content-Disposition: form-data; name="LastName"
>
> MAISON
> ---01myboundary2
> Content-Disposition: form-data; name="Submit"
>
> Submit
> ---01myboundary2--
> DATA
>
> using the form mentionned in the webserv demo
> here's what firefox sends (according to c:\data.bin):
> DATA
> Host: localhost:8080
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.9) 
> Gecko/20050713 Firefox/1.0.5
> Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
> Accept-Encoding: gzip,deflate
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> Keep-Alive: 300
> Connection: keep-alive
> Cache-Control: max-age=0
> Content-Type: multipart/form-data; 
> boundary=---2921238217421
> Content-Length: 358
> -2921238217421
> Content-Disposition: form-data; name="FirstName"
>
> Guillaume
> -2921238217421
> Content-Disposition: form-data; name="LastName"
>
> MAISON
> -2921238217421
> Content-Disposition: form-data; name="Submit"
>
> Button
> -2921238217421-

Re: [twsocket] [HELP] HttpCli and Upload files... FORGET MY MAIL ; )

2005-07-26 Thread Guillaume MAISON
> Hi everyone,
> 
> I want to send some files using ThttpCli and the Post Method.
> i've searched through the ML for code samples, etc...
> 
> Based upon what i've found, here's the code i've written (based upon ICS's 
> httpPost example) :
> 

Right right right...

as usual, i need to pollute the ML just before finding myself the solution...

i'm desperatly sorry for the inconvenience... 

if anyone here comes by AGEN in France, i'd greatly offer a drink ;) 
well not all at the same time uh ?

anyway, just a small question to end :

where is it mentionned that when you define a boundary, 
the http header 
Content-type: multipart/form-data; boundary=-boundary
needs two -- less than the boundaries mentioned in the data after ?

that's something i haven't found anywhere on the net ?

Thanks !

Best regards,

Guillaume MAISON
-
Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

-- 
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


  1   2   >