aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/OSHttpRequest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Servers/OSHttpRequest.cs')
-rw-r--r--OpenSim/Framework/Servers/OSHttpRequest.cs39
1 files changed, 36 insertions, 3 deletions
diff --git a/OpenSim/Framework/Servers/OSHttpRequest.cs b/OpenSim/Framework/Servers/OSHttpRequest.cs
index c523143..7549f08 100644
--- a/OpenSim/Framework/Servers/OSHttpRequest.cs
+++ b/OpenSim/Framework/Servers/OSHttpRequest.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Framework.Servers
59 private IPEndPoint _ipEndPoint; 59 private IPEndPoint _ipEndPoint;
60 60
61 private HttpRequest _request; 61 private HttpRequest _request;
62 // private HttpClientContext _context; 62 private HttpClientContext _context;
63 63
64 public string[] AcceptTypes 64 public string[] AcceptTypes
65 { 65 {
@@ -152,11 +152,28 @@ namespace OpenSim.Framework.Servers
152 get { return _ipEndPoint; } 152 get { return _ipEndPoint; }
153 } 153 }
154 154
155 public HttpRequest HttpRequest 155
156 internal HttpRequest HttpRequest
156 { 157 {
157 get { return _request; } 158 get { return _request; }
158 } 159 }
159 160
161 internal HttpClientContext HttpClientContext
162 {
163 get { return _context; }
164 }
165
166 /// <summary>
167 /// Internal whiteboard for handlers to store temporary stuff
168 /// into.
169 /// </summary>
170 internal Dictionary<string, object> Whiteboard
171 {
172 get { return _whiteboard; }
173 }
174 private Dictionary<string, object> _whiteboard = new Dictionary<string, object>();
175
176
160 public OSHttpRequest() 177 public OSHttpRequest()
161 { 178 {
162 } 179 }
@@ -185,7 +202,7 @@ namespace OpenSim.Framework.Servers
185 202
186 public OSHttpRequest(HttpClientContext context, HttpRequest req) 203 public OSHttpRequest(HttpClientContext context, HttpRequest req)
187 { 204 {
188 // _context = context; 205 _context = context;
189 _request = req; 206 _request = req;
190 207
191 _acceptTypes = req.AcceptTypes; 208 _acceptTypes = req.AcceptTypes;
@@ -215,5 +232,21 @@ namespace OpenSim.Framework.Servers
215 // _isSecureConnection = req.IsSecureConnection; 232 // _isSecureConnection = req.IsSecureConnection;
216 // _isAuthenticated = req.IsAuthenticated; 233 // _isAuthenticated = req.IsAuthenticated;
217 } 234 }
235
236 public override string ToString()
237 {
238 StringBuilder me = new StringBuilder();
239 me.Append(String.Format("OSHttpRequest: {0} {1}\n", HttpMethod, RawUrl));
240 foreach (string k in Headers.AllKeys)
241 {
242 me.Append(String.Format(" {0}: {1}\n", k, Headers[k]));
243 }
244 if (null != RemoteIPEndPoint)
245 {
246 me.Append(String.Format(" IP: {0}\n", RemoteIPEndPoint.ToString()));
247 }
248
249 return me.ToString();
250 }
218 } 251 }
219} 252}