Re: [twsocket] HTTP Post hanging during Basic authorization phase(2nd phase)

2009-01-24 Thread Francois PIETTE
>  That did the trick, it works now.  Fortunately the new ICS (Version 5)
> hasn't affected anything in the current project, but I do have older 
> projects
> that I made modifications to the ICS code which I will have to recode.

Making changes in ICS components is never a good idea unless you discuss the 
change here before and we think your changes are interesting for everyone 
and are implemented in the distribution.

For other changes, specific to your particular needs, you should ALWAYS 
derive your own component from ICS and make the changes in that derived 
class, overriding methods, adding methods, properties and events. This is 
what OOP is all about.

--
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] HTTP Post hanging during Basic authorization phase (2nd phase)

2009-01-23 Thread robertoschler
Thanks Maurizio.  That did the trick, it works now.  Fortunately the new ICS 
(Version 5) hasn't affected anything in the current project, but I do have 
older projects that I made modifications to the ICS code which I will have to 
recode.  That's why I hesitated at first to upgrade.

Robert.


--- On Fri, 1/23/09, Maurizio Lotauro  wrote:

> From: Maurizio Lotauro 
> Subject: Re: [twsocket] HTTP Post hanging during Basic authorization phase 
> (2nd phase)
> To: "ICS support mailing" 
> Date: Friday, January 23, 2009, 7:12 PM
> Scrive robertoschler :
> 
> > I am using Delphi Professional 6.0 pack 2 with ICS. 
> I'm not sure what
> > version of ICS I am using since I don't see the
> version number in the README.
> >  However, I checked HttPProt.pas and the final comment
> reads:
> > 
> > "Oct 15, 2004 V1.71 lotauro.mauri...@dnet.it
> enhanced basic and NTLM
> >  authentifications methods. Event
> OnNTLMAuthStep has been
> >  removed."
> 
> This version has some problem with authentication that was
> corrected in later
> versions. I suggest to upgrade to a more recent one.
> 
> 
> Bye, Maurizio.
> 
> 
> This mail has been sent using Alpikom webmail system
> http://www.alpikom.it
> 
> -- 
> 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] HTTP Post hanging during Basic authorization phase (2nd phase)

2009-01-23 Thread Maurizio Lotauro
Scrive robertoschler :

> I am using Delphi Professional 6.0 pack 2 with ICS.  I'm not sure what
> version of ICS I am using since I don't see the version number in the README.
>  However, I checked HttPProt.pas and the final comment reads:
> 
> "Oct 15, 2004 V1.71 lotauro.mauri...@dnet.it enhanced basic and NTLM
>  authentifications methods. Event OnNTLMAuthStep has been
>  removed."

This version has some problem with authentication that was corrected in later
versions. I suggest to upgrade to a more recent one.


Bye, Maurizio.


This mail has been sent using Alpikom webmail system
http://www.alpikom.it

-- 
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] HTTP Post hanging during Basic authorization phase (2nd phase)

2009-01-23 Thread robertoschler
I am using Delphi Professional 6.0 pack 2 with ICS.  I'm not sure what version 
of ICS I am using since I don't see the version number in the README.  However, 
I checked HttPProt.pas and the final comment reads:

"Oct 15, 2004 V1.71 lotauro.mauri...@dnet.it enhanced basic and NTLM
 authentifications methods. Event OnNTLMAuthStep has been
 removed."

I am trying to access a server that requires Basic Authentication.  I can 
access the server without problem using FireFox.  When I try it with THttpCli 
it hangs on the second attempt after it sends the request with the proper 
Authentication header line.  I matched the Header data up as best as I could 
between what FireFox is sending and with what THttpCli sends during a Post 
attempt.  I captured the Header and Data send and receive events and the 
Headers appear to be identical where it counts (Authorization, Content-Type, 
Accept, etc.).  Note, I configured the Headers using the THttpCli properties, 
not by modifying the data in the OnCommand event (UserName, Password, Accept, 
ContentTypePost, etc.).  I logged the transaction and I can see that THttpCli 
handles the initial 401 error, closes and reopens the connection, and makes the 
second attempt with the correct Authorization line in the Header data.  I 
matched the encoded UserName/Password to the FireFox
 session and they are identical.  However, after the request is sent with the 
Authorization data, THttpCli just hangs waiting for something until I Abort the 
connection.

Does anyone know what is going wrong here or what I can try to debug it?  I 
have included the log I captured during the THttpCli Post session.  I have 
removed the encoded UserName/Password and added comments where I thought it 
might help.

Thanks,
Robert

---

RESPONSE LOG

Retrieving URL.
HttpCli1: Socket state change: Invalid state
HttpCli1: Socket state change: Invalid state
HttpCli1: Socket state change: Invalid state
HttpCli1: Socket state change: Invalid state
HttpCli1: Session connected.
HttpCli1: Socket state change: Invalid state
HttpCli1: Request Header begins.
HttpCli1: Before Header send.!
HttpCli1: Command: POST /rev.cgi HTTP/1.0
HttpCli1: Command: Accept: 
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HttpCli1: Command: Content-Type: application/xml; charset=UTF-8
HttpCli1: Command: User-Agent: Mozilla/4.0 (compatible; ICS)
HttpCli1: Command: Host: 127.0.0.1
HttpCli1: Command: Pragma: no-cache
HttpCli1: Command: Content-Length: 26
HttpCli1: Request header ends.
HttpCli1: Command: 
HttpCli1: Send begins.
HttpCli1: Send data event, length: 26
HttpCli1: Send ends.

// I DO NOT GET PAST THIS POINT DURING THE AUTHORIZATION ATTEMPT.

HttpCli1: Header begins.
HttpCli1: Header Data.
HttpCli1: Header Data.
HttpCli1: Header Data.
HttpCli1: Header Data.
HttpCli1: Header Data.
HttpCli1: Header Data.
HttpCli1: Header ends.
HttpCli1: Socket state change: Invalid state
HttpCli1: Header ends.
HttpCli1: Document begins.
HttpCli1: Doc data event, length: 173
HttpCli1: Document ended.
HttpCli1: Session closed.

// > AUTHORIZATION ATTEMPT

HttpCli1: Socket state change: Invalid state
HttpCli1: Socket state change: Invalid state
HttpCli1: Socket state change: Invalid state
HttpCli1: Socket state change: Invalid state
HttpCli1: Session connected.
HttpCli1: Socket state change: Invalid state
HttpCli1: Request Header begins.
HttpCli1: Before Header send.!
HttpCli1: Command: POST /rev.cgi HTTP/1.0
HttpCli1: Command: Accept: 
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HttpCli1: Command: Content-Type: application/xml; charset=UTF-8
HttpCli1: Command: User-Agent: Mozilla/4.0 (compatible; ICS)
HttpCli1: Command: Host: 127.0.0.1
HttpCli1: Command: Pragma: no-cache
HttpCli1: Command: Content-Length: 26
HttpCli1: Command: Authorization: Basic (encoded login details removed by me 
for privacy reasons but it matches the FireFox session)
HttpCli1: Request header ends.
HttpCli1: Command: 
HttpCli1: Send begins.
HttpCli1: Send ends.

//  THttpCli HANGS HERE.

//  END RESPONSE LOG ---




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