aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/BaseHttpServer.cs
diff options
context:
space:
mode:
authorJeff Ames2008-02-29 10:51:40 +0000
committerJeff Ames2008-02-29 10:51:40 +0000
commit6d774339d9c51c1635e96cd92f57a8bc13021e5f (patch)
treeeb533537aebf610769b0bc64c947a021e9a491ae /OpenSim/Framework/Servers/BaseHttpServer.cs
parentCleaned up a couple compiler warnings. (diff)
downloadopensim-SC_OLD-6d774339d9c51c1635e96cd92f57a8bc13021e5f.zip
opensim-SC_OLD-6d774339d9c51c1635e96cd92f57a8bc13021e5f.tar.gz
opensim-SC_OLD-6d774339d9c51c1635e96cd92f57a8bc13021e5f.tar.bz2
opensim-SC_OLD-6d774339d9c51c1635e96cd92f57a8bc13021e5f.tar.xz
More compiler warning cleanup.
Removed verbose flag, since it doesn't do anything any more.
Diffstat (limited to 'OpenSim/Framework/Servers/BaseHttpServer.cs')
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs20
1 files changed, 7 insertions, 13 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index e61cc80..a61c177 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -25,6 +25,7 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28
28using System; 29using System;
29using System.Collections; 30using System.Collections;
30using System.Collections.Generic; 31using System.Collections.Generic;
@@ -121,7 +122,6 @@ namespace OpenSim.Framework.Servers
121 HttpListenerRequest request = context.Request; 122 HttpListenerRequest request = context.Request;
122 HttpListenerResponse response = context.Response; 123 HttpListenerResponse response = context.Response;
123 124
124
125 response.KeepAlive = false; 125 response.KeepAlive = false;
126 response.SendChunked = false; 126 response.SendChunked = false;
127 127
@@ -160,7 +160,7 @@ namespace OpenSim.Framework.Servers
160 response.OutputStream.Write(buffer, 0, buffer.Length); 160 response.OutputStream.Write(buffer, 0, buffer.Length);
161 response.OutputStream.Close(); 161 response.OutputStream.Close();
162 } 162 }
163 catch (HttpListenerException e) 163 catch (HttpListenerException)
164 { 164 {
165 m_log.InfoFormat("[BASEHTTPSERVER] Http request abnormally terminated."); 165 m_log.InfoFormat("[BASEHTTPSERVER] Http request abnormally terminated.");
166 } 166 }
@@ -263,9 +263,8 @@ namespace OpenSim.Framework.Servers
263 { 263 {
264 xmlRprcRequest = (XmlRpcRequest) (new XmlRpcRequestDeserializer()).Deserialize(requestBody); 264 xmlRprcRequest = (XmlRpcRequest) (new XmlRpcRequestDeserializer()).Deserialize(requestBody);
265 } 265 }
266 catch (XmlException e) 266 catch (XmlException)
267 { 267 {
268
269 } 268 }
270 269
271 if (xmlRprcRequest != null) 270 if (xmlRprcRequest != null)
@@ -407,8 +406,6 @@ namespace OpenSim.Framework.Servers
407 reader.Close(); 406 reader.Close();
408 requestStream.Close(); 407 requestStream.Close();
409 408
410 string responseString = String.Empty;
411
412 Hashtable keysvals = new Hashtable(); 409 Hashtable keysvals = new Hashtable();
413 Hashtable headervals = new Hashtable(); 410 Hashtable headervals = new Hashtable();
414 string host = String.Empty; 411 string host = String.Empty;
@@ -416,11 +413,9 @@ namespace OpenSim.Framework.Servers
416 string[] querystringkeys = request.QueryString.AllKeys; 413 string[] querystringkeys = request.QueryString.AllKeys;
417 string[] rHeaders = request.Headers.AllKeys; 414 string[] rHeaders = request.Headers.AllKeys;
418 415
419
420 foreach (string queryname in querystringkeys) 416 foreach (string queryname in querystringkeys)
421 { 417 {
422 keysvals.Add(queryname, request.QueryString[queryname]); 418 keysvals.Add(queryname, request.QueryString[queryname]);
423
424 } 419 }
425 420
426 foreach (string headername in rHeaders) 421 foreach (string headername in rHeaders)
@@ -447,7 +442,6 @@ namespace OpenSim.Framework.Servers
447 DoHTTPGruntWork(responsedata,response); 442 DoHTTPGruntWork(responsedata,response);
448 443
449 //SendHTML500(response); 444 //SendHTML500(response);
450
451 } 445 }
452 else 446 else
453 { 447 {
@@ -484,6 +478,7 @@ namespace OpenSim.Framework.Servers
484 response.SendChunked = false; 478 response.SendChunked = false;
485 response.ContentLength64 = buffer.Length; 479 response.ContentLength64 = buffer.Length;
486 response.ContentEncoding = Encoding.UTF8; 480 response.ContentEncoding = Encoding.UTF8;
481
487 try 482 try
488 { 483 {
489 response.OutputStream.Write(buffer, 0, buffer.Length); 484 response.OutputStream.Write(buffer, 0, buffer.Length);
@@ -496,9 +491,8 @@ namespace OpenSim.Framework.Servers
496 { 491 {
497 response.OutputStream.Close(); 492 response.OutputStream.Close();
498 } 493 }
499
500
501 } 494 }
495
502 public void SendHTML404(HttpListenerResponse response, string host) 496 public void SendHTML404(HttpListenerResponse response, string host)
503 { 497 {
504 // I know this statuscode is dumb, but the client doesn't respond to 404s and 500s 498 // I know this statuscode is dumb, but the client doesn't respond to 404s and 500s
@@ -511,6 +505,7 @@ namespace OpenSim.Framework.Servers
511 response.SendChunked = false; 505 response.SendChunked = false;
512 response.ContentLength64 = buffer.Length; 506 response.ContentLength64 = buffer.Length;
513 response.ContentEncoding = Encoding.UTF8; 507 response.ContentEncoding = Encoding.UTF8;
508
514 try 509 try
515 { 510 {
516 response.OutputStream.Write(buffer, 0, buffer.Length); 511 response.OutputStream.Write(buffer, 0, buffer.Length);
@@ -524,6 +519,7 @@ namespace OpenSim.Framework.Servers
524 response.OutputStream.Close(); 519 response.OutputStream.Close();
525 } 520 }
526 } 521 }
522
527 public void SendHTML500(HttpListenerResponse response) 523 public void SendHTML500(HttpListenerResponse response)
528 { 524 {
529 // I know this statuscode is dumb, but the client doesn't respond to 404s and 500s 525 // I know this statuscode is dumb, but the client doesn't respond to 404s and 500s
@@ -592,7 +588,6 @@ namespace OpenSim.Framework.Servers
592 } 588 }
593 } 589 }
594 590
595
596 public void RemoveStreamHandler(string httpMethod, string path) 591 public void RemoveStreamHandler(string httpMethod, string path)
597 { 592 {
598 m_streamHandlers.Remove(GetHandlerKey(httpMethod, path)); 593 m_streamHandlers.Remove(GetHandlerKey(httpMethod, path));
@@ -637,6 +632,5 @@ namespace OpenSim.Framework.Servers
637 { 632 {
638 return "<HTML><HEAD><TITLE>500 Internal Server Error</TITLE><BODY><BR /><H1>Ooops!</H1><P>The server you requested is overun by knomes! Find hippos quick!</P></BODY></HTML>"; 633 return "<HTML><HEAD><TITLE>500 Internal Server Error</TITLE><BODY><BR /><H1>Ooops!</H1><P>The server you requested is overun by knomes! Find hippos quick!</P></BODY></HTML>";
639 } 634 }
640
641 } 635 }
642} 636}