diff options
author | gareth | 2007-04-13 15:14:21 +0000 |
---|---|---|
committer | gareth | 2007-04-13 15:14:21 +0000 |
commit | dd5f4abdb9423dd767ccb1c8be310e40fdd1ad43 (patch) | |
tree | a9a3647fca57f49e00fed77006bd5379841f5828 /OpenSim | |
parent | aaaaaaarrrrrrrrrggggghhhhhhhh why oh why? (diff) | |
download | opensim-SC-dd5f4abdb9423dd767ccb1c8be310e40fdd1ad43.zip opensim-SC-dd5f4abdb9423dd767ccb1c8be310e40fdd1ad43.tar.gz opensim-SC-dd5f4abdb9423dd767ccb1c8be310e40fdd1ad43.tar.bz2 opensim-SC-dd5f4abdb9423dd767ccb1c8be310e40fdd1ad43.tar.xz |
Fixed weird XML/HTTP bugs
Can now update a sim profile at startup automatically! W00t!
Untested neighbours code (for sim crossings)
Didn't drink any red bull today :( Used liquid guarana extract + cola
Diffstat (limited to '')
-rw-r--r-- | OpenSim.RegionServer/RegionInfo.cs | 6 | ||||
-rw-r--r-- | OpenSim.Servers/BaseHttpServer.cs | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim.RegionServer/RegionInfo.cs b/OpenSim.RegionServer/RegionInfo.cs index 9958f1a..abc674f 100644 --- a/OpenSim.RegionServer/RegionInfo.cs +++ b/OpenSim.RegionServer/RegionInfo.cs | |||
@@ -44,7 +44,8 @@ namespace OpenSim | |||
44 | //we really want to keep any server connection code out of here and out of the code code | 44 | //we really want to keep any server connection code out of here and out of the code code |
45 | // and put it in the server connection classes (those inheriting from IGridServer etc) | 45 | // and put it in the server connection classes (those inheriting from IGridServer etc) |
46 | string reqtext; | 46 | string reqtext; |
47 | reqtext = "<authkey>" + this.GridSendKey + "</authkey>"; | 47 | reqtext = "<Root>"; |
48 | reqtext += "<authkey>" + this.GridSendKey + "</authkey>"; | ||
48 | reqtext += "<sim>"; | 49 | reqtext += "<sim>"; |
49 | reqtext += "<uuid>" + this.SimUUID.ToString() + "</uuid>"; | 50 | reqtext += "<uuid>" + this.SimUUID.ToString() + "</uuid>"; |
50 | reqtext += "<regionname>" + this.RegionName + "</regionname>"; | 51 | reqtext += "<regionname>" + this.RegionName + "</regionname>"; |
@@ -54,6 +55,7 @@ namespace OpenSim | |||
54 | reqtext += "<region_locy>" + this.RegionLocY.ToString() + "</region_locy>"; | 55 | reqtext += "<region_locy>" + this.RegionLocY.ToString() + "</region_locy>"; |
55 | reqtext += "<estate_id>1</estate_id>"; | 56 | reqtext += "<estate_id>1</estate_id>"; |
56 | reqtext += "</sim>"; | 57 | reqtext += "</sim>"; |
58 | reqtext += "</Root>"; | ||
57 | 59 | ||
58 | byte[] reqdata = (new System.Text.ASCIIEncoding()).GetBytes(reqtext); | 60 | byte[] reqdata = (new System.Text.ASCIIEncoding()).GetBytes(reqtext); |
59 | 61 | ||
@@ -67,7 +69,7 @@ namespace OpenSim | |||
67 | stOut.Close(); | 69 | stOut.Close(); |
68 | 70 | ||
69 | WebResponse gridresp = GridSaveReq.GetResponse(); | 71 | WebResponse gridresp = GridSaveReq.GetResponse(); |
70 | StreamReader stIn = new StreamReader(gridresp.GetResponseStream()); | 72 | StreamReader stIn = new StreamReader(gridresp.GetResponseStream(), Encoding.ASCII); |
71 | string GridResponse = stIn.ReadToEnd(); | 73 | string GridResponse = stIn.ReadToEnd(); |
72 | stIn.Close(); | 74 | stIn.Close(); |
73 | gridresp.Close(); | 75 | gridresp.Close(); |
diff --git a/OpenSim.Servers/BaseHttpServer.cs b/OpenSim.Servers/BaseHttpServer.cs index 0a123b7..bb8f0ad 100644 --- a/OpenSim.Servers/BaseHttpServer.cs +++ b/OpenSim.Servers/BaseHttpServer.cs | |||
@@ -154,6 +154,7 @@ namespace OpenSim.Servers | |||
154 | 154 | ||
155 | public virtual void HandleRequest(Object stateinfo) | 155 | public virtual void HandleRequest(Object stateinfo) |
156 | { | 156 | { |
157 | try { | ||
157 | HttpListenerContext context = (HttpListenerContext)stateinfo; | 158 | HttpListenerContext context = (HttpListenerContext)stateinfo; |
158 | 159 | ||
159 | HttpListenerRequest request = context.Request; | 160 | HttpListenerRequest request = context.Request; |
@@ -210,7 +211,10 @@ namespace OpenSim.Servers | |||
210 | response.SendChunked = false; | 211 | response.SendChunked = false; |
211 | response.ContentLength64 = buffer.Length; | 212 | response.ContentLength64 = buffer.Length; |
212 | output.Write(buffer, 0, buffer.Length); | 213 | output.Write(buffer, 0, buffer.Length); |
213 | output.Close(); | 214 | output.Close(); |
215 | } catch (Exception e) { | ||
216 | Console.WriteLine(e.ToString()); | ||
217 | } | ||
214 | } | 218 | } |
215 | 219 | ||
216 | public void Start() | 220 | public void Start() |