diff options
author | gareth | 2007-04-12 18:34:17 +0000 |
---|---|---|
committer | gareth | 2007-04-12 18:34:17 +0000 |
commit | cc53580ba4bb688baf75159d728c03ccfc568aec (patch) | |
tree | 2a1d54583252d3a056e54cb4ed6bf33743aadb99 /OpenSim.RegionServer/RegionInfo.cs | |
parent | * Replaced GridHTTPServer and UserHTTPServer with BaseHttpServer (diff) | |
download | opensim-SC_OLD-cc53580ba4bb688baf75159d728c03ccfc568aec.zip opensim-SC_OLD-cc53580ba4bb688baf75159d728c03ccfc568aec.tar.gz opensim-SC_OLD-cc53580ba4bb688baf75159d728c03ccfc568aec.tar.bz2 opensim-SC_OLD-cc53580ba4bb688baf75159d728c03ccfc568aec.tar.xz |
aaaaaaarrrrrrrrrggggghhhhhhhh why oh why?
Diffstat (limited to '')
-rw-r--r-- | OpenSim.RegionServer/RegionInfo.cs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim.RegionServer/RegionInfo.cs b/OpenSim.RegionServer/RegionInfo.cs index 1256b50..9958f1a 100644 --- a/OpenSim.RegionServer/RegionInfo.cs +++ b/OpenSim.RegionServer/RegionInfo.cs | |||
@@ -54,19 +54,23 @@ namespace OpenSim | |||
54 | reqtext += "<region_locy>" + this.RegionLocY.ToString() + "</region_locy>"; | 54 | reqtext += "<region_locy>" + this.RegionLocY.ToString() + "</region_locy>"; |
55 | reqtext += "<estate_id>1</estate_id>"; | 55 | reqtext += "<estate_id>1</estate_id>"; |
56 | reqtext += "</sim>"; | 56 | reqtext += "</sim>"; |
57 | |||
58 | byte[] reqdata = (new System.Text.ASCIIEncoding()).GetBytes(reqtext); | ||
57 | 59 | ||
58 | WebRequest GridSaveReq = WebRequest.Create(this.GridURL + "sims/" + this.SimUUID.ToString()); | 60 | WebRequest GridSaveReq = WebRequest.Create(this.GridURL + "sims/" + this.SimUUID.ToString()); |
59 | GridSaveReq.Method = "POST"; | 61 | GridSaveReq.Method = "POST"; |
60 | GridSaveReq.ContentType = "text/plaintext"; | 62 | GridSaveReq.ContentType = "application/x-www-form-urlencoded"; |
61 | GridSaveReq.ContentLength = reqtext.Length; | 63 | GridSaveReq.ContentLength = reqdata.Length; |
62 | 64 | ||
63 | StreamWriter stOut = new StreamWriter(GridSaveReq.GetRequestStream(), System.Text.Encoding.ASCII); | 65 | Stream stOut = GridSaveReq.GetRequestStream(); |
64 | stOut.Write(reqtext); | 66 | stOut.Write(reqdata,0,reqdata.Length); |
65 | stOut.Close(); | 67 | stOut.Close(); |
66 | 68 | ||
67 | StreamReader stIn = new StreamReader(GridSaveReq.GetResponse().GetResponseStream()); | 69 | WebResponse gridresp = GridSaveReq.GetResponse(); |
70 | StreamReader stIn = new StreamReader(gridresp.GetResponseStream()); | ||
68 | string GridResponse = stIn.ReadToEnd(); | 71 | string GridResponse = stIn.ReadToEnd(); |
69 | stIn.Close(); | 72 | stIn.Close(); |
73 | gridresp.Close(); | ||
70 | 74 | ||
71 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("RegionInfo.CS:SaveToGrid() - Grid said: " + GridResponse); | 75 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("RegionInfo.CS:SaveToGrid() - Grid said: " + GridResponse); |
72 | } | 76 | } |