diff options
Began adding POST handler for /sims REST stuff
Diffstat (limited to 'OpenGridServices.GridServer/GridHttp.cs')
-rw-r--r-- | OpenGridServices.GridServer/GridHttp.cs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenGridServices.GridServer/GridHttp.cs b/OpenGridServices.GridServer/GridHttp.cs index 0986061..4bc9ef0 100644 --- a/OpenGridServices.GridServer/GridHttp.cs +++ b/OpenGridServices.GridServer/GridHttp.cs | |||
@@ -33,6 +33,7 @@ using Nwc.XmlRpc; | |||
33 | using System.Threading; | 33 | using System.Threading; |
34 | using System.Text.RegularExpressions; | 34 | using System.Text.RegularExpressions; |
35 | using System.Net; | 35 | using System.Net; |
36 | using System.Xml; | ||
36 | using System.IO; | 37 | using System.IO; |
37 | using System.Collections; | 38 | using System.Collections; |
38 | using System.Collections.Generic; | 39 | using System.Collections.Generic; |
@@ -161,13 +162,19 @@ namespace OpenGridServices.GridServer | |||
161 | respstring+="</sim>"; | 162 | respstring+="</sim>"; |
162 | break; | 163 | break; |
163 | case "POST": | 164 | case "POST": |
165 | XmlDocument doc = new XmlDocument(); | ||
166 | doc.LoadXml(requestBody); | ||
167 | XmlNode authkeynode = doc.FirstChild; | ||
168 | if (authkeynode.Name != "authkey") | ||
169 | respstring = "<error>bad XML - expected authkey tag</error>"; | ||
170 | XmlNode simnode = doc.ChildNodes[1]; | ||
171 | if (simnode.Name != "sim") | ||
172 | respstring = "<error>bad XML - expected sim tag</error>"; | ||
173 | |||
164 | break; | 174 | break; |
165 | } | 175 | } |
166 | } | 176 | } |
167 | break; | 177 | break; |
168 | case "highestuuid": | ||
169 | |||
170 | break; | ||
171 | } | 178 | } |
172 | return ""; | 179 | return ""; |
173 | 180 | ||