[twsocket] Re: Re: 2 questions concerning cookies (Francois PIETTE)

2005-06-11 Thread Julian S.
Mayby I should describe the problem better. 
(at the moment taking about using ordinary browser like IE)
The situation is like this. I open an URL 
(http://blablabla.site.pl/?we=airstriker) which provides me with one and only 
one
simple cookie which is generated by php script and looks like this:

cookie_kod=773321; domain=blablabla.site.pl; path=/;

(I know that it looks like this because I've chacked it with a different 
program)

Ok, so as you can see this cookie is a short-time cookie because it doesn't 
provide an expiration time. So that meens it's 'alive' only till I close a 
session (normally it's when closing a browser or when writting a different URL
 in the browser after this one). When using a browser to open this URL which 
generated the cookie I get a page with a link to another site which is using 
this cookie. So when I normally click the link in the browser the cookie is 
being passed to another site by a new url (it's a php way of passing cookies) 
and it looks like this:

http://blablabla.site.pl/?we=airstrikerkod=773321

(as you can see the only data that the cookie passes is that number generated 
by random)

And that's how it look's like in a browser (f.i. IE).

Now let's get back to your demo HttpTst and let's ask some questions again;)
1. You said: You can use any storage method you like to save the cookie.  - I 
don't 
need to save this cookie on a disc because I don't need it after the session is 
closed so 
any other method to do this would be great (can you please write a really 
simple code how to 
do this because I am quite new to it? :(
2. How should it be done to simulate clicking a link? The idea is simple - it 
must be 
the same session - so how to keep the session alive after opening the first 
URL? And how
to open the next URL in the same session? Or maybe the session is alive all the 
time till I 
close the HttpTst program? What's the answer?
3. Forgive me please my nooblike questions but I am quite new to the subject 
and sure would 
like to learn more;)

Thx for help!

 

--
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 authoring tool: Time2help

2005-06-11 Thread Colin Meeks
Hi Francois

I don't know anything about Time2Help, but I think Help Scribble from
http://www.jgsoft.com may help.I've used it to document several
components and it's pretty easy stuff.

Colin 

On 6/11/05, Francois PIETTE [EMAIL PROTECTED] wrote:
 Long time ago, I used Time2help V2 to build help files for ICS and MidWare.
 I even got an official license for free from the editor to build ICS 
 MidWare help files.
 Now I would like to update those help files, but I have lost my Time2Help
 utility.
 I've searched on the web (www.time2help.com) but it looks like this product
 is dead. Only V1 is still available but that version is unable to open V2
 projects !
 
 Does anyone know where I can get Time2help V2 ? Maybe someone still have the
 product on his hard drive.
 Alternatively, what product can replace Time2help (that is scan Delphi
 source code and extract help from comments) ?
 Please answer privately because subject is not really on topic in the
 mailing list.
 
 --
 [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
 


-- 

Colin Meeks
http://www.col-boy.com

10 Gmail Accounts to give away. Apply within.

--
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] Re: Re: 2 questions concerning cookies (Francois PIETTE)

2005-06-11 Thread Francois PIETTE
Now let's get back to your demo HttpTst and let's ask some questions 
again;)
1. You said: You can use any storage method you like to save the cookie. 
 - I don't
need to save this cookie on a disc because I don't need it after the 
session is closed so
any other method to do this would be great (can you please write a really 
simple code how to

do this because I am quite new to it? :(


Yes, you don't have to store the cookie on disk. But you may if you like :-)
Cookies are just simple strings. You can store them into a simple 
TStringList. Or you can parse them when received and save the parsed values 
to a record or an object and use a TList or TObjectList to keep a list of 
those items for later use when sending more requests.



2. How should it be done to simulate clicking a link?


Clicking on a link is simple getting the URL specified by the link. You 
use the Get or GetAsync method of the component. You must also search your 
cookie store to find any applicable cookie for the URL you are getting.



The idea is simple - it must be
the same session - so how to keep the session alive after opening the 
first URL?


HTTP is sessionless. That's why cookies has been created. That is the cookie 
which maintain what we could call a session. The server send a cookie and 
the browser send it back with the next request (related to the path 
specified in the cookie). So the server know it is the same session.


And how to open the next URL in the same session? Or maybe the session is 
alive all the time till I

close the HttpTst program? What's the answer?


The session is alive from the time you grab the cookie and as long as you 
send the cookie(s) along with any subsequent requests, no matter if the TCP 
session use for HTTP transport or you quit your program. The session live is 
only depending on the cookie being sent. Some server program doesn't enforce 
cookie expiration (that is they rely on the browser to stop sending an 
expired cookie), other also maintain an expiration date/time at server side 
(Better because someone can easily hack cookies).


The server has no wayt to know that you quite your program or not. HTTP 
protocol specify that several request can be sent thru separate TCP 
sessions. IE use several TCP sessions simultaneously to speed up page 
loading (a web page is frequently a lot of requests).


3. Forgive me please my nooblike questions but I am quite new to the 
subject

and sure would like to learn more;)


You're welcome.

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


- Original Message - 
From: Julian S. [EMAIL PROTECTED]

To: twsocket@elists.org
Sent: Saturday, June 11, 2005 12:35 PM
Subject: [twsocket] Re: Re: 2 questions concerning cookies (Francois PIETTE)



Mayby I should describe the problem better.
(at the moment taking about using ordinary browser like IE)
The situation is like this. I open an URL
(http://blablabla.site.pl/?we=airstriker) which provides me with one and 
only one

simple cookie which is generated by php script and looks like this:

cookie_kod=773321; domain=blablabla.site.pl; path=/;

(I know that it looks like this because I've chacked it with a different 
program)


Ok, so as you can see this cookie is a short-time cookie because it 
doesn't

provide an expiration time. So that meens it's 'alive' only till I close a
session (normally it's when closing a browser or when writting a different 
URL
in the browser after this one). When using a browser to open this URL 
which
generated the cookie I get a page with a link to another site which is 
using
this cookie. So when I normally click the link in the browser the cookie 
is
being passed to another site by a new url (it's a php way of passing 
cookies)

and it looks like this:

http://blablabla.site.pl/?we=airstrikerkod=773321

(as you can see the only data that the cookie passes is that number 
generated by random)


And that's how it look's like in a browser (f.i. IE).

Now let's get back to your demo HttpTst and let's ask some questions 
again;)
1. You said: You can use any storage method you like to save the cookie. 
 - I don't
need to save this cookie on a disc because I don't need it after the 
session is closed so
any other method to do this would be great (can you please write a really 
simple code how to

do this because I am quite new to it? :(
2. How should it be done to simulate clicking a link? The idea is simple - 
it must be
the same session - so how to keep the session alive after opening the 
first URL? And how
to open the next URL in the same session? Or maybe the session is alive 
all the time till I

close the HttpTst program? What's the answer?
3. Forgive me please my nooblike questions but I am quite new to the 
subject and sure would

like to learn more;)

Thx for help!



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

Re: [twsocket] E-Mail SmtpCli/MimeDec

2005-06-11 Thread Francois PIETTE
1. Change the boundary detection to look for #10#13--boundary#10#13 
instead of just --boundary#10#13.  But this might be hard, because as 
far as I understood MimeDec, it already has the stream split into lines 
before testing for boundaries, and so it is not looking for 
--boundary#10#13, but for --boundary in the next string, which 
happens to be a line; in this case, it would need to combine with #2 
below.


InternalDecodeStream read the input stream and find line end (using only LF 
because so much messages are mal formed and use only LF instead of CR/LF 
pair). Of course if CR is there, it is processed transparently. Lines are 
processed by the magic of FNext variable which is a pointer to the next 
procedure to handle data pointed by FCurrentData. FNext is changed according 
to the state or stage of decoding. FNext point to procedures like 
ProcessHeaderLine, ProcessMessageLine, ProcessWaitBoundary, ... So there is 
a finite state machine whose state variable is FNext.


--
[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] S/MIME Test messages needed

2005-06-11 Thread Arno Garrels
Arno Garrels wrote:
 Hello,
 
 I'm writing a helper class for the ICS SSL implemention,
 including S/MIME support. Now I need S/MIME signed/encrypted
 messages produced by different mail clients and senders.
 I would appreciate if you could send me 4 test messages,
 One signed only message as well as a signed and encryted message
 to garrels(AT)duodata.de as well as to arno.garrels(AT)gmx.de.
 
 Subject should be EmailClient + S/MIME method.
 

My certificates are available for download as a zip file at:
http://www.duodata.de/misc/Certs.zip until tomorrow.
 
Included formats are PEM, pkcs#7, DER/X509.

Arno Garrels



--
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] E-Mail SmtpCli/MimeDec

2005-06-11 Thread DZ-Jay

On Jun 11, 2005, at 09:11, Francois PIETTE wrote:
InternalDecodeStream read the input stream and find line end (using 
only LF because so much messages are mal formed and use only LF 
instead of CR/LF pair). Of course if CR is there, it is processed 
transparently.


This is easily explained -- a lot of people working on UNIX/Linux send 
\n at the end of a line in the socket stream, which in the UNIX world 
translates to only LF.  It is easy and convenient to think that 
printing \n at the end of the line is the right thing to do, after 
all, that's the way to do it for any other output stream.  But in most 
text-based, Internet protocols, this is wrong.  I've seen many Perl and 
PHP scripts (like for webmail applications or error reporting tools) do 
this.  The correct way, of course, is to send an explicit CRLF.


dZ.

--
I am a software developer; this is the path I have chosen. May God have 
mercy on my soul.



--
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] E-Mail SmtpCli/MimeDec

2005-06-11 Thread Francois PIETTE
Thanx Francois.  Would you think its better to implement a look-ahead, 
so that every time that a blank line is found, we check if the next 
line is a boundary before adding it to the output stream; or remove it 
from the output stream after a boundary is found?  By the way, is the 
output stream a buffer, or a file stream?  If its a file stream, then 
its probably written to disk already.


Look-ahead is the way to go.

--
[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] E-Mail SmtpCli/MimeDec

2005-06-11 Thread DZ-Jay

On Jun 11, 2005, at 10:46, Francois PIETTE wrote:

Thanx Francois.  Would you think its better to implement a 
look-ahead, so that every time that a blank line is found, we check 
if the next line is a boundary before adding it to the output stream; 
or remove it from the output stream after a boundary is found?  By 
the way, is the output stream a buffer, or a file stream?  If its a 
file stream, then its probably written to disk already.


Look-ahead is the way to go.


Great, Thanx!  I'll work on implementing this next week (if I have 
time).


dZ.


--
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] File Uploads via HTTP

2005-06-11 Thread Keith Willis
Hi All,

Is there a way to upload files directly, (in a similar fashion to FTP) using
the ICS HTTP Client?

Regards,
Keith.



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