diff options
author | Justin Clark-Casey (justincc) | 2012-05-03 01:45:49 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-05-03 01:45:49 +0100 |
commit | 231a3bf147315a9284140476d2b09e13c3fee1c0 (patch) | |
tree | f04ffb5bb43d919c1687af57e4cb48829f6dc437 /OpenSim/Framework/Servers/HttpServer/RestHTTPHandler.cs | |
parent | Comment out the five second sleep in etm.DoTeleport() if the old agent needs ... (diff) | |
download | opensim-SC_OLD-231a3bf147315a9284140476d2b09e13c3fee1c0.zip opensim-SC_OLD-231a3bf147315a9284140476d2b09e13c3fee1c0.tar.gz opensim-SC_OLD-231a3bf147315a9284140476d2b09e13c3fee1c0.tar.bz2 opensim-SC_OLD-231a3bf147315a9284140476d2b09e13c3fee1c0.tar.xz |
Implement optional name and description on http stream handlers so that we can relate a slow request to what the handler actually does and the agent it serves, if applicable.
This is most useful for capabilities where the url is not self-describing.
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/RestHTTPHandler.cs')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/RestHTTPHandler.cs | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/RestHTTPHandler.cs b/OpenSim/Framework/Servers/HttpServer/RestHTTPHandler.cs index 1f23cac..7f89839 100644 --- a/OpenSim/Framework/Servers/HttpServer/RestHTTPHandler.cs +++ b/OpenSim/Framework/Servers/HttpServer/RestHTTPHandler.cs | |||
@@ -38,19 +38,25 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
38 | get { return m_dhttpMethod; } | 38 | get { return m_dhttpMethod; } |
39 | } | 39 | } |
40 | 40 | ||
41 | public override Hashtable Handle(string path, Hashtable request) | 41 | public RestHTTPHandler(string httpMethod, string path, GenericHTTPMethod dhttpMethod) |
42 | : base(httpMethod, path) | ||
42 | { | 43 | { |
44 | m_dhttpMethod = dhttpMethod; | ||
45 | } | ||
46 | |||
47 | public RestHTTPHandler( | ||
48 | string httpMethod, string path, GenericHTTPMethod dhttpMethod, string name, string description) | ||
49 | : base(httpMethod, path, name, description) | ||
50 | { | ||
51 | m_dhttpMethod = dhttpMethod; | ||
52 | } | ||
43 | 53 | ||
54 | public override Hashtable Handle(string path, Hashtable request) | ||
55 | { | ||
44 | string param = GetParam(path); | 56 | string param = GetParam(path); |
45 | request.Add("param", param); | 57 | request.Add("param", param); |
46 | request.Add("path", path); | 58 | request.Add("path", path); |
47 | return m_dhttpMethod(request); | 59 | return m_dhttpMethod(request); |
48 | } | 60 | } |
49 | |||
50 | public RestHTTPHandler(string httpMethod, string path, GenericHTTPMethod dhttpMethod) | ||
51 | : base(httpMethod, path) | ||
52 | { | ||
53 | m_dhttpMethod = dhttpMethod; | ||
54 | } | ||
55 | } | 61 | } |
56 | } | 62 | } |