aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMW2007-06-22 22:30:39 +0000
committerMW2007-06-22 22:30:39 +0000
commitb2eb668814586f6c4df7644ed33e9574a0697fc0 (patch)
tree906be1a7385705425bbd0079e7a59f33060f037f
parentStarted work on CAPS support, now we have our first test capability, MapLayer... (diff)
downloadopensim-SC_OLD-b2eb668814586f6c4df7644ed33e9574a0697fc0.zip
opensim-SC_OLD-b2eb668814586f6c4df7644ed33e9574a0697fc0.tar.gz
opensim-SC_OLD-b2eb668814586f6c4df7644ed33e9574a0697fc0.tar.bz2
opensim-SC_OLD-b2eb668814586f6c4df7644ed33e9574a0697fc0.tar.xz
Deleted some comments being wrote to console
-rw-r--r--Common/OpenSim.Servers/BaseHttpServer.cs3
-rw-r--r--OpenSim/OpenSim.Region/Caps.cs15
2 files changed, 11 insertions, 7 deletions
diff --git a/Common/OpenSim.Servers/BaseHttpServer.cs b/Common/OpenSim.Servers/BaseHttpServer.cs
index 71c36a7..1071692 100644
--- a/Common/OpenSim.Servers/BaseHttpServer.cs
+++ b/Common/OpenSim.Servers/BaseHttpServer.cs
@@ -213,7 +213,7 @@ namespace OpenSim.Servers
213 //Console.WriteLine(requestBody); 213 //Console.WriteLine(requestBody);
214 214
215 string responseString = ""; 215 string responseString = "";
216 Console.WriteLine("new request " + request.ContentType); 216 //Console.WriteLine("new request " + request.ContentType);
217 switch (request.ContentType) 217 switch (request.ContentType)
218 { 218 {
219 case "text/xml": 219 case "text/xml":
@@ -228,7 +228,6 @@ namespace OpenSim.Servers
228 case "application/xml": 228 case "application/xml":
229 // probably LLSD we hope, otherwise it should be ignored by the parser 229 // probably LLSD we hope, otherwise it should be ignored by the parser
230 // responseString = ParseLLSDXML(requestBody); 230 // responseString = ParseLLSDXML(requestBody);
231 Console.WriteLine(" request " + request.HttpMethod + " to " + request.RawUrl);
232 responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod); 231 responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod);
233 response.AddHeader("Content-type", "application/xml"); 232 response.AddHeader("Content-type", "application/xml");
234 break; 233 break;
diff --git a/OpenSim/OpenSim.Region/Caps.cs b/OpenSim/OpenSim.Region/Caps.cs
index c672d29..f3ee628 100644
--- a/OpenSim/OpenSim.Region/Caps.cs
+++ b/OpenSim/OpenSim.Region/Caps.cs
@@ -13,6 +13,7 @@ namespace OpenSim.Region
13 private string MainPath = "00334-0000/"; 13 private string MainPath = "00334-0000/";
14 private string MapLayerPath = "00334-0001/"; 14 private string MapLayerPath = "00334-0001/";
15 private BaseHttpServer httpListener; 15 private BaseHttpServer httpListener;
16 // private LLUUID agentID;
16 17
17 public Caps(BaseHttpServer httpServer, string httpListen, uint httpPort) 18 public Caps(BaseHttpServer httpServer, string httpListen, uint httpPort)
18 { 19 {
@@ -26,7 +27,7 @@ namespace OpenSim.Region
26 /// </summary> 27 /// </summary>
27 public void RegisterHandlers() 28 public void RegisterHandlers()
28 { 29 {
29 Console.WriteLine("registering caps handlers"); 30 Console.WriteLine("registering CAPS handlers");
30 httpListener.AddRestHandler("POST", "/CAPS/" + MainPath, CapsRequest); 31 httpListener.AddRestHandler("POST", "/CAPS/" + MainPath, CapsRequest);
31 httpListener.AddRestHandler("POST", "/CAPS/" + MapLayerPath, MapLayer); 32 httpListener.AddRestHandler("POST", "/CAPS/" + MapLayerPath, MapLayer);
32 } 33 }
@@ -40,7 +41,6 @@ namespace OpenSim.Region
40 /// <returns></returns> 41 /// <returns></returns>
41 public string CapsRequest(string request, string path, string param) 42 public string CapsRequest(string request, string path, string param)
42 { 43 {
43 Console.WriteLine("Caps request " + request);
44 string result = "<llsd><map>"; 44 string result = "<llsd><map>";
45 result += this.GetCapabilities(); 45 result += this.GetCapabilities();
46 result += "</map></llsd>"; 46 result += "</map></llsd>";
@@ -53,7 +53,10 @@ namespace OpenSim.Region
53 /// <returns></returns> 53 /// <returns></returns>
54 protected string GetCapabilities() 54 protected string GetCapabilities()
55 { 55 {
56 string capURLS = "<key>MapLayer</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + MapLayerPath + "</string>"; 56 string capURLS="";
57
58 capURLS += "<key>MapLayer</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + MapLayerPath + "</string>";
59
57 return capURLS; 60 return capURLS;
58 } 61 }
59 62
@@ -66,7 +69,7 @@ namespace OpenSim.Region
66 /// <returns></returns> 69 /// <returns></returns>
67 public string MapLayer(string request, string path, string param) 70 public string MapLayer(string request, string path, string param)
68 { 71 {
69 Console.WriteLine("Caps MapLayer request " + request); 72
70 string res = "<llsd><map><key>AgentData</key><map><key>Flags</key><integer>0</integer></map><key>LayerData</key><array>"; 73 string res = "<llsd><map><key>AgentData</key><map><key>Flags</key><integer>0</integer></map><key>LayerData</key><array>";
71 res += this.BuildLLSDMapLayerResponse(); 74 res += this.BuildLLSDMapLayerResponse();
72 res += "</array></map></llsd>"; 75 res += "</array></map></llsd>";
@@ -79,6 +82,7 @@ namespace OpenSim.Region
79 /// <returns></returns> 82 /// <returns></returns>
80 protected string BuildLLSDMapLayerResponse() 83 protected string BuildLLSDMapLayerResponse()
81 { 84 {
85 string res = "";
82 int left; 86 int left;
83 int right; 87 int right;
84 int top; 88 int top;
@@ -91,7 +95,8 @@ namespace OpenSim.Region
91 right = 1500; 95 right = 1500;
92 image = new LLUUID("00000000-0000-0000-9999-000000000006"); 96 image = new LLUUID("00000000-0000-0000-9999-000000000006");
93 97
94 string res= "<map><key>Left</key><integer>"+left+"</integer><key>Bottom</key><integer>"+bottom +"</integer><key>Top</key><integer>"+top+"</integer><key>Right</key><integer>"+right+"</integer><key>ImageID</key><uuid>"+image.ToStringHyphenated()+"</uuid></map>"; 98 res += "<map><key>Left</key><integer>" + left + "</integer><key>Bottom</key><integer>" + bottom + "</integer><key>Top</key><integer>" + top + "</integer><key>Right</key><integer>" + right + "</integer><key>ImageID</key><uuid>" + image.ToStringHyphenated() + "</uuid></map>";
99
95 return res; 100 return res;
96 } 101 }
97 } 102 }