* Replacing Net.HttpListener with HttpServer.

* This is a HUGE update..  and should be considered fraut with peril.
* SSL Mode isn't available *yet* but I'll work on that next.
* DrScofld is still working on a radical new thread pump scheme for this which will be implemented soon.
* This could break the Build!  This could break your Grid!
This commit is contained in:
Teravus Ovares
2008-09-30 16:56:33 +00:00
parent d683fe36ea
commit 79b2e5ac71
6 changed files with 300 additions and 94 deletions

View File

@@ -199,40 +199,40 @@ namespace OpenSim.Framework.Servers
// _isAuthenticated = req.IsAuthenticated;
}
// public OSHttpRequest(HttpClientContext context, HttpRequest req)
// {
// _context = context;
// _request = req;
public OSHttpRequest(HttpServer.IHttpClientContext context, HttpServer.IHttpRequest req)
{
//_context = context;
HttpServer.IHttpRequest _request = req;
// _acceptTypes = req.AcceptTypes;
// if (null != req.Headers["content-encoding"])
// _contentEncoding = Encoding.GetEncoding(_request.Headers["content-encoding"]);
// _contentLength64 = req.ContentLength;
// if (null != req.Headers["content-type"])
// _contentType = _request.Headers["content-type"];
// _headers = req.Headers;
// _httpMethod = req.Method;
// _hasbody = req.ContentLength != 0;
// _inputStream = req.Body;
// _keepAlive = ConnectionType.KeepAlive == req.Connection;
// _rawUrl = req.Uri.AbsolutePath;
// _url = req.Uri;
// if (null != req.Headers["user-agent"])
// _userAgent = req.Headers["user-agent"];
// _queryString = new NameValueCollection();
// _query = new Hashtable();
// foreach (KeyValuePair<string, HttpInputItem> q in req.QueryString)
// {
// _queryString.Add(q.Key, q.Value.Value);
// _query[q.Key] = q.Value.Value;
// }
// // TODO: requires change to HttpServer.HttpRequest
// _ipEndPoint = null;
_acceptTypes = req.AcceptTypes;
if (null != req.Headers["content-encoding"])
_contentEncoding = Encoding.GetEncoding(_request.Headers["content-encoding"]);
_contentLength64 = req.ContentLength;
if (null != req.Headers["content-type"])
_contentType = _request.Headers["content-type"];
_headers = req.Headers;
_httpMethod = req.Method;
_hasbody = req.ContentLength != 0;
_inputStream = req.Body;
_keepAlive = ConnectionType.KeepAlive == req.Connection;
_rawUrl = req.Uri.AbsolutePath;
_url = req.Uri;
if (null != req.Headers["user-agent"])
_userAgent = req.Headers["user-agent"];
_queryString = new NameValueCollection();
_query = new Hashtable();
foreach (KeyValuePair<string, HttpInputItem> q in req.QueryString)
{
_queryString.Add(q.Key, q.Value.Value);
_query[q.Key] = q.Value.Value;
}
// TODO: requires change to HttpServer.HttpRequest
_ipEndPoint = null;
// // _cookies = req.Cookies;
// // _isSecureConnection = req.IsSecureConnection;
// // _isAuthenticated = req.IsAuthenticated;
// }
// _cookies = req.Cookies;
// _isSecureConnection = req.IsSecureConnection;
// _isAuthenticated = req.IsAuthenticated;
}
public override string ToString()
{