diff options
author | Dr Scofield | 2008-05-20 16:51:45 +0000 |
---|---|---|
committer | Dr Scofield | 2008-05-20 16:51:45 +0000 |
commit | a53cea6b7e4094ea51339c80ab5fe160a19a9f6b (patch) | |
tree | 7294600ad7bbec50ff34e35b1c46a380d2d7d549 /OpenSim/Grid | |
parent | From: Jeremy Bongio <jbongio@us.ibm.com> (diff) | |
download | opensim-SC-a53cea6b7e4094ea51339c80ab5fe160a19a9f6b.zip opensim-SC-a53cea6b7e4094ea51339c80ab5fe160a19a9f6b.tar.gz opensim-SC-a53cea6b7e4094ea51339c80ab5fe160a19a9f6b.tar.bz2 opensim-SC-a53cea6b7e4094ea51339c80ab5fe160a19a9f6b.tar.xz |
i'm extending the RestStreamHandler.Handler(...) signature to actually
provide OSHttpRequest and OSHttpResponse to our REST handler.
also, this adds proper RestPlugin.IsGod() checking against the X-OpenSim-Godkey
HTTP request header.
last, i added XML doc comments to RestPlugin.cs
Diffstat (limited to 'OpenSim/Grid')
-rw-r--r-- | OpenSim/Grid/GridServer/GridManager.cs | 24 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserManager.cs | 6 |
2 files changed, 23 insertions, 7 deletions
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index 83b5319..5a6a328 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs | |||
@@ -877,10 +877,13 @@ namespace OpenSim.Grid.GridServer | |||
877 | /// <param name="request"></param> | 877 | /// <param name="request"></param> |
878 | /// <param name="path"></param> | 878 | /// <param name="path"></param> |
879 | /// <param name="param"></param> | 879 | /// <param name="param"></param> |
880 | /// <param name="httpRequest">HTTP request header object</param> | ||
881 | /// <param name="httpResponse">HTTP response header object</param> | ||
880 | /// <returns></returns> | 882 | /// <returns></returns> |
881 | public string RestGetRegionMethod(string request, string path, string param) | 883 | public string RestGetRegionMethod(string request, string path, string param, |
884 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | ||
882 | { | 885 | { |
883 | return RestGetSimMethod(String.Empty, "/sims/", param); | 886 | return RestGetSimMethod(String.Empty, "/sims/", param, httpRequest, httpResponse); |
884 | } | 887 | } |
885 | 888 | ||
886 | /// <summary> | 889 | /// <summary> |
@@ -889,10 +892,13 @@ namespace OpenSim.Grid.GridServer | |||
889 | /// <param name="request"></param> | 892 | /// <param name="request"></param> |
890 | /// <param name="path"></param> | 893 | /// <param name="path"></param> |
891 | /// <param name="param"></param> | 894 | /// <param name="param"></param> |
895 | /// <param name="httpRequest">HTTP request header object</param> | ||
896 | /// <param name="httpResponse">HTTP response header object</param> | ||
892 | /// <returns></returns> | 897 | /// <returns></returns> |
893 | public string RestSetRegionMethod(string request, string path, string param) | 898 | public string RestSetRegionMethod(string request, string path, string param, |
899 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | ||
894 | { | 900 | { |
895 | return RestSetSimMethod(String.Empty, "/sims/", param); | 901 | return RestSetSimMethod(String.Empty, "/sims/", param, httpRequest, httpResponse); |
896 | } | 902 | } |
897 | 903 | ||
898 | /// <summary> | 904 | /// <summary> |
@@ -901,8 +907,11 @@ namespace OpenSim.Grid.GridServer | |||
901 | /// <param name="request"></param> | 907 | /// <param name="request"></param> |
902 | /// <param name="path"></param> | 908 | /// <param name="path"></param> |
903 | /// <param name="param">A string representing the sim's UUID</param> | 909 | /// <param name="param">A string representing the sim's UUID</param> |
910 | /// <param name="httpRequest">HTTP request header object</param> | ||
911 | /// <param name="httpResponse">HTTP response header object</param> | ||
904 | /// <returns>Information about the sim in XML</returns> | 912 | /// <returns>Information about the sim in XML</returns> |
905 | public string RestGetSimMethod(string request, string path, string param) | 913 | public string RestGetSimMethod(string request, string path, string param, |
914 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | ||
906 | { | 915 | { |
907 | string respstring = String.Empty; | 916 | string respstring = String.Empty; |
908 | 917 | ||
@@ -946,8 +955,11 @@ namespace OpenSim.Grid.GridServer | |||
946 | /// <param name="request"></param> | 955 | /// <param name="request"></param> |
947 | /// <param name="path"></param> | 956 | /// <param name="path"></param> |
948 | /// <param name="param"></param> | 957 | /// <param name="param"></param> |
958 | /// <param name="httpRequest">HTTP request header object</param> | ||
959 | /// <param name="httpResponse">HTTP response header object</param> | ||
949 | /// <returns>"OK" or an error</returns> | 960 | /// <returns>"OK" or an error</returns> |
950 | public string RestSetSimMethod(string request, string path, string param) | 961 | public string RestSetSimMethod(string request, string path, string param, |
962 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | ||
951 | { | 963 | { |
952 | Console.WriteLine("Processing region update via REST method"); | 964 | Console.WriteLine("Processing region update via REST method"); |
953 | RegionProfileData theSim; | 965 | RegionProfileData theSim; |
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index 1cf2a48..706f461 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -35,6 +35,7 @@ using log4net; | |||
35 | using Nwc.XmlRpc; | 35 | using Nwc.XmlRpc; |
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Communications; | 37 | using OpenSim.Framework.Communications; |
38 | using OpenSim.Framework.Servers; | ||
38 | 39 | ||
39 | namespace OpenSim.Grid.UserServer | 40 | namespace OpenSim.Grid.UserServer |
40 | { | 41 | { |
@@ -53,8 +54,11 @@ namespace OpenSim.Grid.UserServer | |||
53 | /// <param name="request">The request</param> | 54 | /// <param name="request">The request</param> |
54 | /// <param name="path">The path (eg /bork/narf/test)</param> | 55 | /// <param name="path">The path (eg /bork/narf/test)</param> |
55 | /// <param name="param">Parameters sent</param> | 56 | /// <param name="param">Parameters sent</param> |
57 | /// <param name="httpRequest">HTTP request header object</param> | ||
58 | /// <param name="httpResponse">HTTP response header object</param> | ||
56 | /// <returns>Success "OK" else error</returns> | 59 | /// <returns>Success "OK" else error</returns> |
57 | public string RestDeleteUserSessionMethod(string request, string path, string param) | 60 | public string RestDeleteUserSessionMethod(string request, string path, string param, |
61 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | ||
58 | { | 62 | { |
59 | // TODO! Important! | 63 | // TODO! Important! |
60 | 64 | ||