aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs
diff options
context:
space:
mode:
authorDiva Canto2013-02-27 20:50:03 -0800
committerDiva Canto2013-02-27 20:50:03 -0800
commit64b8ce73dabcf651beadcc11cbe94db69cc3ea0e (patch)
treeab7f3a63c166185a5fd9d6d5a7e36a18d63a9817 /OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs
parentMoved the HG default variables out of [Startup] and into their own section [H... (diff)
parentAdd comment to example region modules about need to add Assembly annotation i... (diff)
downloadopensim-SC_OLD-64b8ce73dabcf651beadcc11cbe94db69cc3ea0e.zip
opensim-SC_OLD-64b8ce73dabcf651beadcc11cbe94db69cc3ea0e.tar.gz
opensim-SC_OLD-64b8ce73dabcf651beadcc11cbe94db69cc3ea0e.tar.bz2
opensim-SC_OLD-64b8ce73dabcf651beadcc11cbe94db69cc3ea0e.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs')
-rw-r--r--OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs32
1 files changed, 18 insertions, 14 deletions
diff --git a/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs b/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs
index 3dce578..6681c37 100644
--- a/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs
+++ b/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs
@@ -65,23 +65,27 @@ namespace OpenSim.Framework.Configuration.HTTP
65 byte[] buf = new byte[8192]; 65 byte[] buf = new byte[8192];
66 HttpWebRequest request = 66 HttpWebRequest request =
67 (HttpWebRequest) WebRequest.Create(remoteConfigSettings.baseConfigURL + configFileName); 67 (HttpWebRequest) WebRequest.Create(remoteConfigSettings.baseConfigURL + configFileName);
68 HttpWebResponse response = (HttpWebResponse) request.GetResponse(); 68 using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
69
70 Stream resStream = response.GetResponseStream();
71
72 string tempString = null;
73 int count = 0;
74
75 do
76 { 69 {
77 count = resStream.Read(buf, 0, buf.Length); 70 using (Stream resStream = response.GetResponseStream())
78 if (count != 0)
79 { 71 {
80 tempString = Util.UTF8.GetString(buf, 0, count); 72 string tempString = null;
81 sb.Append(tempString); 73 int count = 0;
74
75 do
76 {
77 count = resStream.Read(buf, 0, buf.Length);
78 if (count != 0)
79 {
80 tempString = Util.UTF8.GetString(buf, 0, count);
81 sb.Append(tempString);
82 }
83 }
84 while (count > 0);
85
86 LoadDataFromString(sb.ToString());
82 } 87 }
83 } while (count > 0); 88 }
84 LoadDataFromString(sb.ToString());
85 } 89 }
86 catch (WebException) 90 catch (WebException)
87 { 91 {