I sent the following to the list about a month ago, but no-one ever replied. I'm not sure it that means no-one's interested or no-one saw the message:
I've noticed this in both V5 and V6 beta: The problem: HTTPCli.UserName := ''; HTTPCli.Password := ''; HTTPCli.URL := 'http://server.com/members'; HTTPCli.GetAsync; Returns 401 Authentication required. Using the same instance of HTTPCli as above (Ie after the above code): HTTPCli.UserName := 'username'; HTTPCli.Password := 'password'; HTTPCli.URL := 'http://server.com/members'; HTTPCli.GetAsync; Returns a StatusCode of 0. This is due to some data being left in ReceiveBuffer (or rather, ReceiveLen not being reset to zero). The first header line of the second call is added after the spurious data, and the status code is therefore in the wrong place in the buffer. I've got a work around, by placing ReceiveLength := 0; in InternalClear, but I don't understand the authentication part of the code well enough to know how to fix it properly. 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