* Set KeepAlive to false for logins so logins after the first won't break

* Set Expect100Continue to false to prevent an unnecessary handshake in HTTP POST exchanges

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1131 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2007-04-18 04:17:07 +00:00
parent 510d72e324
commit b65a4dcbe3
2 changed files with 5 additions and 1 deletions

View File

@@ -303,7 +303,8 @@ namespace libsecondlife
byte[] bytes = Encoding.UTF8.GetBytes(output.ToString());
LoginRequest = (HttpWebRequest)HttpWebRequest.Create(loginParams.URI);
LoginRequest.Timeout = loginParams.Timeout;
LoginRequest.Timeout = loginParams.Timeout; // TODO: This won't do anything with async calls
LoginRequest.KeepAlive = false;
LoginRequest.Method = "POST";
LoginRequest.ContentType = "text/xml";
LoginRequest.ContentLength = bytes.Length;

View File

@@ -216,6 +216,9 @@ namespace libsecondlife
DisconnectTimer = new System.Timers.Timer();
DisconnectTimer.Elapsed += new ElapsedEventHandler(DisconnectTimer_Elapsed);
// Don't force Expect-100: Continue headers on HTTP POST calls
ServicePointManager.Expect100Continue = false;
// Catch exceptions from threads in the managed threadpool
Toub.Threading.ManagedThreadPool.UnhandledException +=
new UnhandledExceptionEventHandler(ManagedThreadPool_UnhandledException);