From 27df816184d237a8466947546e5535bf7b1cb9bd Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Fri, 30 Jan 2009 08:48:41 +0000 Subject: fixing: client gets logged out when concierge's broker returns 500 response. adding: more verbose error logging --- .../Modules/Avatar/Concierge/ConciergeModule.cs | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment/Modules') diff --git a/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs index ffc2d36..06d6c8d 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs @@ -412,18 +412,35 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge private void UpdateBrokerDone(IAsyncResult result) { + HttpWebRequest updatePost = null; try { - HttpWebRequest updatePost = result.AsyncState as HttpWebRequest; + updatePost = result.AsyncState as HttpWebRequest; using (HttpWebResponse response = updatePost.EndGetResponse(result) as HttpWebResponse) { - response.Close(); _log.DebugFormat("[Concierge] broker update: status {0}", response.StatusCode); } } catch (WebException we) { _log.ErrorFormat("[Concierge] broker update to {0} failed with status {1}", _brokerURI, we.Status); + if (null != we.Response) + { + using(HttpWebResponse resp = we.Response as HttpWebResponse) + { + _log.ErrorFormat("[Concierge] response from {0} request Uri: {1}", _brokerURI, updatePost.RequestUri); + _log.ErrorFormat("[Concierge] response from {0} status code: {1}", _brokerURI, resp.StatusCode); + _log.ErrorFormat("[Concierge] response from {0} status desc: {1}", _brokerURI, resp.StatusDescription); + _log.ErrorFormat("[Concierge] response from {0} server: {1}", _brokerURI, resp.Server); + + if (resp.ContentLength > 0) + { + StreamReader content = new StreamReader(resp.GetResponseStream()); + _log.ErrorFormat("[Concierge] response from {0} content: {1}", _brokerURI, content.ReadToEnd()); + content.Close(); + } + } + } } } -- cgit v1.1