From b65a4dcbe3aadd3cf1fbae1d421eb24e63f30a3d Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Wed, 18 Apr 2007 04:17:07 +0000 Subject: [PATCH] * 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 --- libsecondlife/Login.cs | 3 ++- libsecondlife/NetworkManager.cs | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libsecondlife/Login.cs b/libsecondlife/Login.cs index 84003b8d..5f383bba 100644 --- a/libsecondlife/Login.cs +++ b/libsecondlife/Login.cs @@ -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; diff --git a/libsecondlife/NetworkManager.cs b/libsecondlife/NetworkManager.cs index e2550970..180150c0 100644 --- a/libsecondlife/NetworkManager.cs +++ b/libsecondlife/NetworkManager.cs @@ -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);