Re: [twsocket] HTTP POST answer code 401

2006-03-08 Thread Tibor Csonka
I think server should read all the request from the client (including 
request data) before responding, even in case of 401 response.
Apache does the same.

 From client side, Internet Explorer also retransmits the whole POST 
data with every request.

Fastream Technologies wrote:
 Hello,

 I have a question that I am unsure about POST/require authentication. When a 
 request arrives at a HTTP server, unless it already contains valid auth 
 data, a 401 response is returned. This is very easy with GET and HEAD as the 
 request contains data no more than the header. However with POST, the actual 
 form data which can be more than MBs is uploaded immediately by the client 
 without waiting for a response (unlike FTP). So my problem is:

 - consider a POST request with no auth data and of 1MB size
 - folder is password protected by digest auth
 - at TriggerPOSTdocument, the server decides 401
 - however even after the 401 is sent, data keeps coming from the client
 - the next keep-alive request is bad (garbage!!!)

 Any idea?

 Best Regards,

 SubZero 

   
-- 
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] Skip download of website if larger than X

2006-02-14 Thread Tibor Csonka
http://wiki.overbyte.be/wiki/index.php/THttpCli:OnHeaderEnd
http://wiki.overbyte.be/wiki/index.php/THttpCli:OnDocData

Take a look here.
Regards

Marius van Tubbergh wrote:
 Another question I have:

 I am downloading a list of Url's websites.
 But when the size is larger than X KB it must skip the current download and 
 continue with the next one.

 I want to do a disconnect or something without aborting the entire download 
 process.


 Please advice.

 Thanks!

   
-- 
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] ICS help system?

2006-02-09 Thread Tibor Csonka

I much prefer it were hosted directly at OverByte, but just in case, 
know that the hosting space I have available includes MySQL/PHP and all 
the standard features.  I always intended to make a web site, but never 
found the time, so I have 10GB of space, which I pay for yearly, just 
wasting away.
  

I know the feeling ;)
-- 
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] httpClient, total bytes received / sent

2006-02-08 Thread Tibor Csonka

OnDocDate event:
-

TotalReceived := TotalReceived + Len;

-

  

Yes, but be carefull 'cause if you do UI stuff in OnDocData event the 
transfell could slow down awfully!
-- 
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] httpClient, total bytes received / sent

2006-02-08 Thread Tibor Csonka
If you just inrease an integer in the OnDocData event this shouldn't be 
a performance issue.

Marius van Tubbergh wrote:

Yes, but be carefull 'cause if you do UI stuff in OnDocData event the 
transfell could slow down awfully!



Is there any other way around besides in OnDocData event?
Because performance is of utter most importance to me.




  

-- 
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] ICS help system?

2006-02-08 Thread Tibor Csonka
If DZ-Jay is offering hosting, then I can maybe do the Windows HTML help 
importer, which will take the exported wiki data and build a html source 
from it. I don't know the effort to do that but I'm willing to look at 
it if you like. Anyway it highly depends on the wiki system of choice 
for ICS (I mean the effort).

Best regards,
Tibor Csonka
-- 
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] ICS help system?

2006-02-08 Thread Tibor Csonka
MediaWiki is good for me also.
No problemo, I will install a test here and if you are willing to make 
this effort then I will look at the format of the exported XML files and 
the format for CHM and try to estimate how long would it take to 
implement it. Anyway there is no hurry because the content must be 
written and this takes time.

DZ-Jay wrote:

Tibor Csonka wrote:
  

If DZ-Jay is offering hosting, then I can maybe do the Windows HTML help 
importer, which will take the exported wiki data and build a html source 
from it. I don't know the effort to do that but I'm willing to look at 
it if you like. Anyway it highly depends on the wiki system of choice 
for ICS (I mean the effort).



I suggest WikiMedia, only because its the one I am familiar with.

   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


Re: [twsocket] ICS help system?

2006-02-08 Thread Tibor Csonka
A help system rendered as a searchable indexed CHM is the developer 
_BEST_ friend!
As I can estimate, it's not a hard thing to compile it from the exported 
wiki data.

As for the sourcecode comments, I can only say, if you wish to do it 
then it's ok, do it but it is not a replacement for a real help system. 
Also ICS community could also post code examples, best practices and 
anything what is needed to develop with ICS.

Regards,
Tibor Csonka
-- 
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] Problem with the lists

2006-01-27 Thread Tibor Csonka

yes !

perhaps ICS has reach the almost perfection and doesn't need any support 
anymore ? ;)

I think so too :)
-- 
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] NTLM authentication reloaded

2006-01-20 Thread Tibor Csonka
That is what I ment also. Now the question is that should or should not 
ICS allow other separators than backslash?
And the second question that on the proxy authentication part should we 
use the same technique?

Personally I didn't saw usernames like [EMAIL PROTECTED] until now in windows.
Paul, can you give me examples, where you can configure Proxy/Web server 
with NTLM in the way you pointed out?

Francois PIETTE wrote:

It seemes to me that you have the same problem as me. Try to separe the
user and the domain. If it works let me know so I can patch the proxy
part of NTLM auth too.
Without domain the user will not be authenticated, I tried.



I think you are right. Since NtlmGetMessage3 has provision for domain name, 
it should be put there and not embed it into the username. Embedding domain 
in username is just a convenient way of doing it for the application user 
interface. At the lowest level, in the NTLM messages, domain should be 
written where it belongs to.
--
[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] NTLM authentication reloaded

2006-01-20 Thread Tibor Csonka
Anyway the user tweaks like this separation character should not be the 
concern of ICS but of the application with the functionality.

-- 
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] NTLM authentication reloaded

2006-01-20 Thread Tibor Csonka
I would like to correct the bug report I posted before:

There is no way to set domain for NTLM authentication neither for web 
server or proxy in ICS HttpProt.
A mechanism should be included in the future releases.

A new property for the domain can be added for proxy auth and 
separatelly for web auth or a property in which users can set the domain 
name separator this can be one  for each of the authentication part, 
because it's mainly depends on the implementor application's user inteface.

Best regards,
Tibor Csonka
-- 
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] NTLM authentication reloaded

2006-01-19 Thread Tibor Csonka
Hello list,

I've just ran into a small bug in NTLM authentication from HttpCli.
There is a possibility that the user enters the username as 
domain\username.
In this case HttpCli will send the username and the domain as the 
username, wich is not working (at least on IIS 6).
The code looks like this:
Result := NtlmGetMessage3('', Hostname, FUsername, FPassword, 
FNTLMMsg2Info.Challenge);
where NtlmGetMessage3 is defined as:
function NtlmGetMessage3(const ADomain, AHost, AUser, APassword: 
String; AChallenge: TArrayOf8Bytes): String;
This function will generate the last NTLM message containing the 
authentication information.
The call, as you can see set the domain to empty string in all cases but 
if the user supplies the usernames in the manner I've mentioned before 
this is not correct.

A fast dirty fix which I made is:
DomPos := Pos('\', FUsername);
if DomPos0 then
  begin
Dom   := Copy(FUsername, 1, DomPos-1);
UName := Copy(FUsername, DomPos + 1, Length(FUsername)-DomPos);
  end
else
  begin
Dom   := '';
UName := FUsername;
  end;

Result := NtlmGetMessage3(Dom, Hostname, UName, FPassword, 
FNTLMMsg2Info.Challenge);

I did this in the HTTP authentication part not in the proxy.
Can somebody confirm that in case of NTLM proxies, should work the same way?

Best regards,
Tibor Csonka
-- 
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] NTLM authentication reloaded

2006-01-19 Thread Tibor Csonka
I don't have a specific case where it isn't working.
I was trying to fix things and I thought that someone knows how 
proxies/http servers are accecpting NTLM credentials.

Paul wrote:

I did this in the HTTP authentication part not in the proxy.
Can somebody confirm that in case of NTLM proxies, should work the same 
way?



There are several ways a proxy auth is requested,
it depends on the proxy settings and/or domain
or even a workgroup.

- username
- domain\username
- [EMAIL PROTECTED]

You should try them all yourself and select the one that works

Paul



- Original Message - 
From: Tibor Csonka [EMAIL PROTECTED]
To: twsocket@elists.org
Sent: Thursday, January 19, 2006 5:32 PM
Subject: [twsocket] NTLM authentication reloaded


  

Hello list,

I've just ran into a small bug in NTLM authentication from HttpCli.
There is a possibility that the user enters the username as
domain\username.
In this case HttpCli will send the username and the domain as the
username, wich is not working (at least on IIS 6).
The code looks like this:
   Result := NtlmGetMessage3('', Hostname, FUsername, FPassword,
FNTLMMsg2Info.Challenge);
where NtlmGetMessage3 is defined as:
   function NtlmGetMessage3(const ADomain, AHost, AUser, APassword:
String; AChallenge: TArrayOf8Bytes): String;
This function will generate the last NTLM message containing the
authentication information.
The call, as you can see set the domain to empty string in all cases but
if the user supplies the usernames in the manner I've mentioned before
this is not correct.

A fast dirty fix which I made is:
   DomPos := Pos('\', FUsername);
   if DomPos0 then
 begin
   Dom   := Copy(FUsername, 1, DomPos-1);
   UName := Copy(FUsername, DomPos + 1, Length(FUsername)-DomPos);
 end
   else
 begin
   Dom   := '';
   UName := FUsername;
 end;

Result := NtlmGetMessage3(Dom, Hostname, UName, FPassword,
FNTLMMsg2Info.Challenge);

I did this in the HTTP authentication part not in the proxy.
Can somebody confirm that in case of NTLM proxies, should work the same 
way?

Best regards,
Tibor Csonka
-- 
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] NTLM authentication reloaded

2006-01-19 Thread Tibor Csonka
Maybe we should include the '@' also as separator.

Paul wrote:

Maurizio,

different users can have different rights also.

The only way I found sofar is detect a domain yourself
and try all possible authentications possible and pick the
one that succeeds.

So if the user is in a domain, then try logon with

username
domain\username
[EMAIL PROTECTED]


Paul


- Original Message - 
From: Maurizio Lotauro [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Friday, January 20, 2006 1:47 AM
Subject: Re: [twsocket] NTLM authentication reloaded


  

Scrive Tibor Csonka [EMAIL PROTECTED]:



Hello list,

I've just ran into a small bug in NTLM authentication from HttpCli.
There is a possibility that the user enters the username as
domain\username.
In this case HttpCli will send the username and the domain as the
username, wich is not working (at least on IIS 6).
  

[...]



The call, as you can see set the domain to empty string in all cases but
if the user supplies the usernames in the manner I've mentioned before
this is not correct.
  

[...]



I did this in the HTTP authentication part not in the proxy.
Can somebody confirm that in case of NTLM proxies, should work the same 
way?
  

I have a strange situation. A customer use ISA server for proxy and has
enabled the NTLM authentication. To authenticate some user must include 
the
domain (domain\username) and some other user must not include it (I mean, 
if
they include the domain they will not authenticated). I don't have
investigated what is the difference between these users.
You have a similar situation with IIS? I mean, if you don't include the 
domain
you will be authenticated?


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://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] TeamICS web page

2005-10-30 Thread Tibor Csonka
LOL, it's good to see you guys! It was like I was changing mails with
phantoms. 

Keep up the good work!
Best regards,
Tibor Csonka

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Francois PIETTE
 Sent: Wednesday, October 26, 2005 9:38 PM
 To: twsocket@elists.org
 Subject: [twsocket] TeamICS web page
 
 Ever wanted to know who are the ICS experts taking time to answer your
 questions ?
 Just have a look at this page:
 http://www.overbyte.be/eng/overbyte/teamics.html
 
 Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
 --
 [EMAIL PROTECTED]
 The author for 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://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] Downloading a webpage, including its pictures. How??

2005-10-30 Thread Tibor Csonka
ThttpCli is the best fit, but if you want HTTPS, contribute a bit to SSL
effort :) and use TSslHttpCli.

You will have to have a good HTML parser also and maybe a JavaScript
interpreter.

The basic idea is to dwomload a 'first page' (that's from where all the
crawling begins) parse the HTML search for links and request them, then
parse all the resulted data, search for links, request them. This is the
basic repetitive task that you app should do. Of course you must check to
download a page only once, also take care of badly implemented custom 404
pages. 

Regards,
Tibor Csonka

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Public
 Sent: Friday, October 28, 2005 5:26 PM
 To: ICS support mailing
 Subject: [twsocket] Downloading a webpage, including its pictures. How??
 
 Hello,
 
 I would like to download a webpage, including all its pictures, to my
 local harddrive.
 I will later use the local file and display this in a Twebbrowser.
 
 How can I do this?
 Which components do you recommend me to use?
 
 /Perry Jönsson
 --
 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] HttpCli: Opinion wanted !

2005-08-31 Thread Tibor Csonka
Hi,

I was reading the thread for a while, and my oppinion is that the design is
very ok. I mean it makes the thing extensible and it's also clean and
elegant.

My only concern is: is there any other encoding than gzip/deflate? Because I
cannot think of one ...

Regards,
Tibor Csonka

-- 
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] Reuse Port ( TIME_WAIT )

2005-05-12 Thread Tibor Csonka
By any chance, your DB is MySQL?

Because I've had the same problem with apache PHP and MySQL. MySQL just
keeps thousands of TIME_WAIT sockets for some (for me at least) unknown
reason.

If you have MySQL, then I think it is not a ThttpCli issue (this time).

Regards

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of ???
Sent: Thursday, May 12, 2005 2:22 PM
To: twsocket@elists.org
Subject: [twsocket] Reuse Port ( TIME_WAIT )


Hi 

I use THttpCli to send real-time request to get replay from Apache 2.0.53
and php thru network.
I make many requests to retrieve records from a DB by php calll on apache -
10 requests per seconds to apache.
Every 5 seconds, I make the same requests to check wether there is changes.
This works very well with THttpCli .

But on the Apache sides, I noticed that there are so many TIME_WAIT
connections
when I check with netstat -a.  Actually, connections keep on increasing.

So, there are many remaining TIME_WAIT sockets on apache.

Is It possible Reuse Socket Port so that only initial 10 connections are
acive?

I thought it could be done by re-using the connection.

What can i do for this ?

thanks in advance.

/Eric


-- 
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] Overwriting of HttpCli properties

2005-04-27 Thread Tibor Csonka
Hello,

In my oppinion username and(or) passwords in the url are really useless to
implement. Think about Internet Explorer which inhibed this also. Also, how
can you specify proxy credentials in the url?

regards

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Maurizio Lotauro
Sent: Wednesday, April 27, 2005 7:11 PM
To: ICS support mailing
Subject: [twsocket] Overwriting of HttpCli properties

Hello,

while I'm working on the fix for the authentication I would like to remove
one 
think that I don't like. The component will overwrite the Username and 
Password properties when an user and a password is specified in the url.

The problem is that when the user set another url without user and password 
then the properties mantains the values specified in the previous url. This 
will mean that it is possible that these values could be sent to the wrong 
server, and if a basic authentication is used, it could be a security issue.

I would like to change this behaviour in the following way. The user will be

get from url if present, otherwise from the Username property. The same for 
the password. The properties will be not changed anymore.

Before doing this I want to hear the opinion of all developers that are in 
this mailing list, in particular if there are good reasons to do not apply 
these changes.

The same logic will apply to Connection and ProxyConnection, but it's 
overwriting appeared very recently, so I don't think that it will break any 
existing code. More probably is true the opposite.


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