From 85e3231c612d380e146c288b8ef73318e10b97b5 Mon Sep 17 00:00:00 2001
From: gareth
Date: Fri, 6 Apr 2007 13:46:26 +0000
Subject: Began adding POST handler for /sims REST stuff
---
OpenGridServices.GridServer/GridHttp.cs | 13 ++++++++++---
1 file 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;
using System.Threading;
using System.Text.RegularExpressions;
using System.Net;
+using System.Xml;
using System.IO;
using System.Collections;
using System.Collections.Generic;
@@ -161,13 +162,19 @@ namespace OpenGridServices.GridServer
respstring+="";
break;
case "POST":
+ XmlDocument doc = new XmlDocument();
+ doc.LoadXml(requestBody);
+ XmlNode authkeynode = doc.FirstChild;
+ if (authkeynode.Name != "authkey")
+ respstring = "bad XML - expected authkey tag";
+ XmlNode simnode = doc.ChildNodes[1];
+ if (simnode.Name != "sim")
+ respstring = "bad XML - expected sim tag";
+
break;
}
}
break;
- case "highestuuid":
-
- break;
}
return "";
--
cgit v1.1