diff options
author | Dr Scofield | 2009-01-26 21:35:16 +0000 |
---|---|---|
committer | Dr Scofield | 2009-01-26 21:35:16 +0000 |
commit | 6cebb6e7607c7197852300f1c2f014927094dbb4 (patch) | |
tree | 26dd037fa5415984d638ccec31d5a386952f26ae | |
parent | adding XML parsing to make sure POST content is welformed (diff) | |
download | opensim-SC-6cebb6e7607c7197852300f1c2f014927094dbb4.zip opensim-SC-6cebb6e7607c7197852300f1c2f014927094dbb4.tar.gz opensim-SC-6cebb6e7607c7197852300f1c2f014927094dbb4.tar.bz2 opensim-SC-6cebb6e7607c7197852300f1c2f014927094dbb4.tar.xz |
~ fixing bugs in ConciergeServer.py test code
~ fix bug in ConciergeModule: wrong closing tag for avatars list
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs | 2 | ||||
-rwxr-xr-x | OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeServer.py | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs index 2d1f381..b4f1a9e 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeModule.cs | |||
@@ -391,7 +391,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Concierge | |||
391 | string name = _attendeeNames[uuid]; | 391 | string name = _attendeeNames[uuid]; |
392 | list.Append(String.Format(" <avatar name=\"{0}\" uuid=\"{1}\" />\n", name, uuid)); | 392 | list.Append(String.Format(" <avatar name=\"{0}\" uuid=\"{1}\" />\n", name, uuid)); |
393 | } | 393 | } |
394 | list.Append("</avatar>"); | 394 | list.Append("</avatars>"); |
395 | } | 395 | } |
396 | string payload = list.ToString(); | 396 | string payload = list.ToString(); |
397 | 397 | ||
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeServer.py b/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeServer.py index e5b1fd2..4a1a2b0 100755 --- a/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeServer.py +++ b/OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeServer.py | |||
@@ -61,12 +61,12 @@ class ConciergeHandler(BaseHTTPServer.BaseHTTPRequestHandler): | |||
61 | 61 | ||
62 | self.logResponse(200) | 62 | self.logResponse(200) |
63 | 63 | ||
64 | def dumpXml(xml): | 64 | def dumpXml(self, xml): |
65 | logging.debug('[ConciergeHandler] %s', xml.tag) | 65 | logging.debug('[ConciergeHandler] %s', xml.tag) |
66 | for attr in xml.attrib: | 66 | for attr in xml.attrib: |
67 | logging.debug('[ConciergeHandler] %s [%s] %s', xml.tag, attr, xml.attrib[attr]) | 67 | logging.debug('[ConciergeHandler] %s [%s] %s', xml.tag, attr, xml.attrib[attr]) |
68 | for kid in xml.getchildren: | 68 | for kid in xml.getchildren(): |
69 | dumpXml(kid) | 69 | self.dumpXml(kid) |
70 | 70 | ||
71 | def do_POST(self): | 71 | def do_POST(self): |
72 | self.logRequest() | 72 | self.logRequest() |
@@ -80,8 +80,8 @@ class ConciergeHandler(BaseHTTPServer.BaseHTTPRequestHandler): | |||
80 | 80 | ||
81 | logging.debug('[ConciergeHandler] POST: content: %s', content) | 81 | logging.debug('[ConciergeHandler] POST: content: %s', content) |
82 | try: | 82 | try: |
83 | postXml = ET.parse(content) | 83 | postXml = ET.fromstring(content) |
84 | dumpXml(postXml) | 84 | self.dumpXml(postXml) |
85 | except xml.parsers.expat.ExpatError, xmlError: | 85 | except xml.parsers.expat.ExpatError, xmlError: |
86 | logging.error('[ConciergeHandler] POST illformed:%s', xmlError) | 86 | logging.error('[ConciergeHandler] POST illformed:%s', xmlError) |
87 | self.send_response(500) | 87 | self.send_response(500) |