| Dart Home | PowerTCP Web for ActiveX | Custom Development | Reply | PowerTCP Web for ActiveX Topics | Forums |
| Author | Forum: PowerTCP Web for ActiveX Topic: Post Method and Basic Authentication |
| User401 Posts: 1 Member Since: 12/01/01 |
posted December 1, 2001 7:51 AM I am using the Post method to send an XML string to a server, using basic authentication. I have noticed that the data gets sent twice. The first send occurs before the user credentials have been authenticated. After the first send, the prompt for authentication occurs, is resolved, and then the data is sent for a second time. As I am sending potentially large volumes of data at very frequent intervals, this adds a costly overhead. Is there anyway for the authentication to be resolved up front before the data is sent? |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted December 3, 2001 10:24 AM Hi, The protocol dictates that an Authorization header be added to a request after the server asks for it. For the server to ask, it must respond to something. So, to prevent sending large amounts of data twice, you may be able to send a smaller request to elicit the server's Authorization request. Then, subsequent requests to the server will contain the Basic Authentication. Another option, if you know the base 64 encoded username and password, is to just add the: Authorization: Basic encodedAuth header to the Request headers in your original Post call, without waiting for the server to ask for it. -ken K M Drake Dart Tech Support |
| Reply | PowerTCP Web for ActiveX Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|