aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-10-22 23:35:07 +0100
committerJustin Clark-Casey (justincc)2010-10-22 23:35:07 +0100
commit21187f459ea2ae590dda4249fa15ebf116d04fe0 (patch)
tree48cfec3b73bdbf54f7bc22059044b92271deedc1 /OpenSim/Framework
parentRevert "* refactor refactor refactor ServerURI 4 lyfe" (diff)
parentMerge branch 'hg16' into mantis5110 (diff)
downloadopensim-SC-21187f459ea2ae590dda4249fa15ebf116d04fe0.zip
opensim-SC-21187f459ea2ae590dda4249fa15ebf116d04fe0.tar.gz
opensim-SC-21187f459ea2ae590dda4249fa15ebf116d04fe0.tar.bz2
opensim-SC-21187f459ea2ae590dda4249fa15ebf116d04fe0.tar.xz
Merge remote branch 'otakup0pe/mantis5110'
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Capabilities/CapsUtil.cs2
-rw-r--r--OpenSim/Framework/RegionInfo.cs39
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs4
3 files changed, 38 insertions, 7 deletions
diff --git a/OpenSim/Framework/Capabilities/CapsUtil.cs b/OpenSim/Framework/Capabilities/CapsUtil.cs
index 0334e4b..faf2708 100644
--- a/OpenSim/Framework/Capabilities/CapsUtil.cs
+++ b/OpenSim/Framework/Capabilities/CapsUtil.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Framework.Capabilities
41 /// <returns></returns> 41 /// <returns></returns>
42 public static string GetCapsSeedPath(string capsObjectPath) 42 public static string GetCapsSeedPath(string capsObjectPath)
43 { 43 {
44 return "/CAPS/" + capsObjectPath + "0000/"; 44 return "CAPS/" + capsObjectPath + "0000/";
45 } 45 }
46 46
47 /// <summary> 47 /// <summary>
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 08d5398..73b8bd0 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -115,8 +115,20 @@ namespace OpenSim.Framework
115 /// </summary> 115 /// </summary>
116 public string ServerURI 116 public string ServerURI
117 { 117 {
118 get { return m_serverURI; } 118 get {
119 set { m_serverURI = value; } 119 if ( m_serverURI != string.Empty ) {
120 return m_serverURI;
121 } else {
122 return "http://" + m_externalHostName + ":" + m_httpPort + "/";
123 }
124 }
125 set {
126 if ( value.EndsWith("/") ) {
127 m_serverURI = value;
128 } else {
129 m_serverURI = value + '/';
130 }
131 }
120 } 132 }
121 protected string m_serverURI; 133 protected string m_serverURI;
122 134
@@ -141,6 +153,7 @@ namespace OpenSim.Framework
141 153
142 public SimpleRegionInfo() 154 public SimpleRegionInfo()
143 { 155 {
156 m_serverURI = string.Empty;
144 } 157 }
145 158
146 public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) 159 public SimpleRegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri)
@@ -150,6 +163,7 @@ namespace OpenSim.Framework
150 163
151 m_internalEndPoint = internalEndPoint; 164 m_internalEndPoint = internalEndPoint;
152 m_externalHostName = externalUri; 165 m_externalHostName = externalUri;
166 m_serverURI = string.Empty;
153 } 167 }
154 168
155 public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, uint port) 169 public SimpleRegionInfo(uint regionLocX, uint regionLocY, string externalUri, uint port)
@@ -160,6 +174,7 @@ namespace OpenSim.Framework
160 m_externalHostName = externalUri; 174 m_externalHostName = externalUri;
161 175
162 m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port); 176 m_internalEndPoint = new IPEndPoint(IPAddress.Parse("0.0.0.0"), (int) port);
177 m_serverURI = string.Empty;
163 } 178 }
164 179
165 public SimpleRegionInfo(RegionInfo ConvertFrom) 180 public SimpleRegionInfo(RegionInfo ConvertFrom)
@@ -449,6 +464,7 @@ namespace OpenSim.Framework
449 configMember = 464 configMember =
450 new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig); 465 new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig);
451 configMember.performConfigurationRetrieve(); 466 configMember.performConfigurationRetrieve();
467 m_serverURI = string.Empty;
452 } 468 }
453 469
454 public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri) 470 public RegionInfo(uint regionLocX, uint regionLocY, IPEndPoint internalEndPoint, string externalUri)
@@ -458,10 +474,12 @@ namespace OpenSim.Framework
458 474
459 m_internalEndPoint = internalEndPoint; 475 m_internalEndPoint = internalEndPoint;
460 m_externalHostName = externalUri; 476 m_externalHostName = externalUri;
477 m_serverURI = string.Empty;
461 } 478 }
462 479
463 public RegionInfo() 480 public RegionInfo()
464 { 481 {
482 m_serverURI = string.Empty;
465 } 483 }
466 484
467 public EstateSettings EstateSettings 485 public EstateSettings EstateSettings
@@ -551,10 +569,23 @@ namespace OpenSim.Framework
551 /// <summary> 569 /// <summary>
552 /// A well-formed URI for the host region server (namely "http://" + ExternalHostName) 570 /// A well-formed URI for the host region server (namely "http://" + ExternalHostName)
553 /// </summary> 571 /// </summary>
572
554 public string ServerURI 573 public string ServerURI
555 { 574 {
556 get { return m_serverURI; } 575 get {
557 set { m_serverURI = value; } 576 if ( m_serverURI != string.Empty ) {
577 return m_serverURI;
578 } else {
579 return "http://" + m_externalHostName + ":" + m_httpPort + "/";
580 }
581 }
582 set {
583 if ( value.EndsWith("/") ) {
584 m_serverURI = value;
585 } else {
586 m_serverURI = value + '/';
587 }
588 }
558 } 589 }
559 590
560 public string RegionName 591 public string RegionName
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index ba8c194..0c1e5e0 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -348,7 +348,7 @@ namespace OpenSim.Framework.Servers.HttpServer
348 { 348 {
349 try 349 try
350 { 350 {
351// m_log.Debug("[BASE HTTP SERVER]: Handling request to " + request.RawUrl); 351 //m_log.Debug("[BASE HTTP SERVER]: Handling request to " + request.RawUrl);
352 352
353 Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true); 353 Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true);
354 354
@@ -376,7 +376,7 @@ namespace OpenSim.Framework.Servers.HttpServer
376 string path = request.RawUrl; 376 string path = request.RawUrl;
377 string handlerKey = GetHandlerKey(request.HttpMethod, path); 377 string handlerKey = GetHandlerKey(request.HttpMethod, path);
378 378
379// m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path); 379 //m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path);
380 380
381 if (TryGetStreamHandler(handlerKey, out requestHandler)) 381 if (TryGetStreamHandler(handlerKey, out requestHandler))
382 { 382 {