* Get the code up to speed with my -#dev e-mail example. (uncomment out lines 227 - 235 to test.
							parent
							
								
									f6699892dc
								
							
						
					
					
						commit
						6ea5b515d0
					
				|  | @ -323,7 +323,8 @@ namespace OpenSim.Framework.Servers | |||
| 
 | ||||
|                 OSHttpRequest  request  = new OSHttpRequest(context.Request); | ||||
|                 OSHttpResponse response = new OSHttpResponse(context.Response); | ||||
| 
 | ||||
|                 context.Response.ProtocolVersion = new Version("1.0"); | ||||
|                 context.Response.KeepAlive = false; | ||||
|                 //  This is the REST agent interface. We require an agent to properly identify | ||||
|                 //  itself. If the REST handler recognizes the prefix it will attempt to | ||||
|                 //  satisfy the request. If it is not recognizable, and no damage has occurred | ||||
|  | @ -991,11 +992,17 @@ namespace OpenSim.Framework.Servers | |||
|             int responsecode = (int)responsedata["int_response_code"]; | ||||
|             string responseString = (string)responsedata["str_response_string"]; | ||||
|             string contentType = (string)responsedata["content_type"]; | ||||
|             if (responsedata.ContainsKey("error_status_text")) | ||||
|             { | ||||
|                 response.StatusDescription = (string)responsedata["error_status_text"]; | ||||
|             } | ||||
| 
 | ||||
|              | ||||
|             if (responsedata.ContainsKey("keepalive")) | ||||
|                 response.KeepAlive = true; | ||||
|             { | ||||
|                 bool keepalive = (bool)responsedata["keepalive"]; | ||||
|                 response.KeepAlive = keepalive; | ||||
| 
 | ||||
|             } | ||||
|             //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this | ||||
|             //and should check for NullReferenceExceptions | ||||
| 
 | ||||
|  | @ -1014,7 +1021,7 @@ namespace OpenSim.Framework.Servers | |||
|                 response.StatusCode = responsecode; | ||||
|             } | ||||
| 
 | ||||
|             response.AddHeader("Content-type", contentType); | ||||
|             response.AddHeader("Content-Type", contentType); | ||||
| 
 | ||||
|             byte[] buffer; | ||||
| 
 | ||||
|  | @ -1121,12 +1128,18 @@ namespace OpenSim.Framework.Servers | |||
|                 if (!m_ssl) | ||||
|                 { | ||||
|                     m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); | ||||
|                     //m_httpListener.Prefixes.Add("http://10.1.1.5:" + m_port + "/"); | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     m_httpListener.Prefixes.Add("https://+:" + (m_sslport) + "/"); | ||||
|                     m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); | ||||
|                 } | ||||
|                 HttpListenerPrefixCollection prefixs = m_httpListener.Prefixes; | ||||
| 
 | ||||
|                 foreach (string prefix in prefixs) | ||||
|                     System.Console.WriteLine("Listening on: " + prefix); | ||||
|                  | ||||
|                 m_httpListener.Start(); | ||||
| 
 | ||||
|                 HttpListenerContext context; | ||||
|  |  | |||
|  | @ -200,6 +200,23 @@ namespace OpenSim.Framework.Servers | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         public Version ProtocolVersion | ||||
|         { | ||||
|             get | ||||
|             { | ||||
|                 if (!HttpServer) | ||||
|                     return _httpListenerResponse.ProtocolVersion; | ||||
|               | ||||
|                 return new Version("1.0"); | ||||
|             } | ||||
|             set | ||||
|             { | ||||
|                 if (!HttpServer) | ||||
|                     _httpListenerResponse.ProtocolVersion = value; | ||||
|                  | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         /// <summary> | ||||
|         /// Return the output stream feeding the body. | ||||
|         /// </summary> | ||||
|  |  | |||
|  | @ -177,7 +177,7 @@ namespace OpenSim.Region.Environment.Modules.Framework | |||
|                 if (m_ids.ContainsKey(avatar.UUID)) | ||||
|                 { | ||||
|                     // close the event queue. | ||||
|                     m_ids[avatar.UUID] = -1; | ||||
|                     //m_ids[avatar.UUID] = -1; | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|  | @ -224,6 +224,16 @@ namespace OpenSim.Region.Environment.Modules.Framework | |||
|             lock (m_ids)  | ||||
|                 thisID = m_ids[agentID]; | ||||
| 
 | ||||
|             //if (element == null) | ||||
|             //{ | ||||
|             //    responsedata["int_response_code"] = 502; | ||||
|             //    responsedata["content_type"] = "text/plain"; | ||||
|             //    responsedata["keepalive"] = false; | ||||
|             //    responsedata["str_response_string"] = "Upstream error: "; | ||||
|             //    responsedata["error_status_text"] = "Upstream error:"; | ||||
|             //    return responsedata; | ||||
|             //} | ||||
| 
 | ||||
|             if (thisID == -1) // close-request | ||||
|             { | ||||
|                 responsedata["int_response_code"] = 502; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Teravus Ovares
						Teravus Ovares