Began adding POST handler for /sims REST stuff

0.1-prestable
gareth 2007-04-06 13:46:26 +00:00
parent 802d443be8
commit 85e3231c61
1 changed files with 10 additions and 3 deletions

View File

@ -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+="</sim>";
break;
case "POST":
XmlDocument doc = new XmlDocument();
doc.LoadXml(requestBody);
XmlNode authkeynode = doc.FirstChild;
if (authkeynode.Name != "authkey")
respstring = "<error>bad XML - expected authkey tag</error>";
XmlNode simnode = doc.ChildNodes[1];
if (simnode.Name != "sim")
respstring = "<error>bad XML - expected sim tag</error>";
break;
}
}
break;
case "highestuuid":
break;
}
return "";