diff options
author | Diva Canto | 2013-02-27 20:50:03 -0800 |
---|---|---|
committer | Diva Canto | 2013-02-27 20:50:03 -0800 |
commit | 64b8ce73dabcf651beadcc11cbe94db69cc3ea0e (patch) | |
tree | ab7f3a63c166185a5fd9d6d5a7e36a18d63a9817 /OpenSim/Framework/Servers/HttpServer | |
parent | Moved the HG default variables out of [Startup] and into their own section [H... (diff) | |
parent | Add comment to example region modules about need to add Assembly annotation i... (diff) | |
download | opensim-SC-64b8ce73dabcf651beadcc11cbe94db69cc3ea0e.zip opensim-SC-64b8ce73dabcf651beadcc11cbe94db69cc3ea0e.tar.gz opensim-SC-64b8ce73dabcf651beadcc11cbe94db69cc3ea0e.tar.bz2 opensim-SC-64b8ce73dabcf651beadcc11cbe94db69cc3ea0e.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/RestSessionService.cs | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs index 19c03a8..edcd134 100644 --- a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs +++ b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs | |||
@@ -101,20 +101,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
101 | using (WebResponse resp = request.GetResponse()) | 101 | using (WebResponse resp = request.GetResponse()) |
102 | { | 102 | { |
103 | XmlSerializer deserializer = new XmlSerializer(typeof(TResponse)); | 103 | XmlSerializer deserializer = new XmlSerializer(typeof(TResponse)); |
104 | Stream respStream = null; | 104 | |
105 | try | 105 | using (Stream respStream = resp.GetResponseStream()) |
106 | { | ||
107 | respStream = resp.GetResponseStream(); | ||
108 | deserial = (TResponse)deserializer.Deserialize(respStream); | 106 | deserial = (TResponse)deserializer.Deserialize(respStream); |
109 | } | ||
110 | catch { } | ||
111 | finally | ||
112 | { | ||
113 | if (respStream != null) | ||
114 | respStream.Close(); | ||
115 | resp.Close(); | ||
116 | } | ||
117 | } | 107 | } |
108 | |||
118 | return deserial; | 109 | return deserial; |
119 | } | 110 | } |
120 | } | 111 | } |