diff options
author | Teravus Ovares | 2009-07-21 06:47:29 +0000 |
---|---|---|
committer | Teravus Ovares | 2009-07-21 06:47:29 +0000 |
commit | c243ae43f23be20ec3388ed30e8b7b806ad2a2a7 (patch) | |
tree | 2c38ab90f6c81e08ada7ef4f4dbad6da77afd75a /OpenSim/Framework/Servers/Tests | |
parent | * nothing in this commit, re-triggering panda.. which crashed while testing. (diff) | |
download | opensim-SC_OLD-c243ae43f23be20ec3388ed30e8b7b806ad2a2a7.zip opensim-SC_OLD-c243ae43f23be20ec3388ed30e8b7b806ad2a2a7.tar.gz opensim-SC_OLD-c243ae43f23be20ec3388ed30e8b7b806ad2a2a7.tar.bz2 opensim-SC_OLD-c243ae43f23be20ec3388ed30e8b7b806ad2a2a7.tar.xz |
* Updated C# WebServer to the latest available source download (r19869) and applied a few mods from the old version (now up on opensim-libs (VS 3.5 project).
* Made various changes to BaseHttpServer to accommodate the new interfaces.
* This version has been significantly re-architected and may fail in unusual and insidious ways.
* Please pay attention to any errors you get and post a Mantis if you can reproduce an issue with the HTTPServer. I'm including the pdb and having the http server compiled in debug for a few weeks so that when an error occurs, it'll print the pertenant data.
* Once again, this is the full C# WebServer, not the lite branch that is included in LibOMV (we need SSL!)
Diffstat (limited to 'OpenSim/Framework/Servers/Tests')
-rw-r--r-- | OpenSim/Framework/Servers/Tests/OSHttpTests.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/Tests/OSHttpTests.cs b/OpenSim/Framework/Servers/Tests/OSHttpTests.cs index 48db44d..f7f0afa 100644 --- a/OpenSim/Framework/Servers/Tests/OSHttpTests.cs +++ b/OpenSim/Framework/Servers/Tests/OSHttpTests.cs | |||
@@ -46,6 +46,10 @@ namespace OpenSim.Framework.Servers.Tests | |||
46 | public class TestHttpClientContext: IHttpClientContext | 46 | public class TestHttpClientContext: IHttpClientContext |
47 | { | 47 | { |
48 | private bool _secured; | 48 | private bool _secured; |
49 | public bool IsSecured | ||
50 | { | ||
51 | get { return _secured; } | ||
52 | } | ||
49 | public bool Secured | 53 | public bool Secured |
50 | { | 54 | { |
51 | get { return _secured; } | 55 | get { return _secured; } |
@@ -62,10 +66,19 @@ namespace OpenSim.Framework.Servers.Tests | |||
62 | public void Respond(string body) {} | 66 | public void Respond(string body) {} |
63 | public void Send(byte[] buffer) {} | 67 | public void Send(byte[] buffer) {} |
64 | public void Send(byte[] buffer, int offset, int size) {} | 68 | public void Send(byte[] buffer, int offset, int size) {} |
69 | public void Respond(string httpVersion, HttpStatusCode statusCode, string reason, string body, string contentType) {} | ||
70 | |||
71 | public event EventHandler<DisconnectedEventArgs> Disconnected = delegate { }; | ||
72 | /// <summary> | ||
73 | /// A request have been received in the context. | ||
74 | /// </summary> | ||
75 | public event EventHandler<RequestEventArgs> RequestReceived = delegate { }; | ||
76 | |||
65 | } | 77 | } |
66 | 78 | ||
67 | public class TestHttpRequest: IHttpRequest | 79 | public class TestHttpRequest: IHttpRequest |
68 | { | 80 | { |
81 | private string _uriPath; | ||
69 | public bool BodyIsComplete | 82 | public bool BodyIsComplete |
70 | { | 83 | { |
71 | get { return true; } | 84 | get { return true; } |
@@ -183,6 +196,24 @@ namespace OpenSim.Framework.Servers.Tests | |||
183 | 196 | ||
184 | return clone; | 197 | return clone; |
185 | } | 198 | } |
199 | public IHttpResponse CreateResponse(IHttpClientContext context) | ||
200 | { | ||
201 | return new HttpResponse(context, this); | ||
202 | } | ||
203 | /// <summary> | ||
204 | /// Path and query (will be merged with the host header) and put in Uri | ||
205 | /// </summary> | ||
206 | /// <see cref="Uri"/> | ||
207 | public string UriPath | ||
208 | { | ||
209 | get { return _uriPath; } | ||
210 | set | ||
211 | { | ||
212 | _uriPath = value; | ||
213 | |||
214 | } | ||
215 | } | ||
216 | |||
186 | } | 217 | } |
187 | 218 | ||
188 | public class TestHttpResponse: IHttpResponse | 219 | public class TestHttpResponse: IHttpResponse |