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 /OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeServer.py | |
parent | adding XML parsing to make sure POST content is welformed (diff) | |
download | opensim-SC_OLD-6cebb6e7607c7197852300f1c2f014927094dbb4.zip opensim-SC_OLD-6cebb6e7607c7197852300f1c2f014927094dbb4.tar.gz opensim-SC_OLD-6cebb6e7607c7197852300f1c2f014927094dbb4.tar.bz2 opensim-SC_OLD-6cebb6e7607c7197852300f1c2f014927094dbb4.tar.xz |
~ fixing bugs in ConciergeServer.py test code
~ fix bug in ConciergeModule: wrong closing tag for avatars list
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeServer.py')
-rwxr-xr-x | OpenSim/Region/Environment/Modules/Avatar/Concierge/ConciergeServer.py | 10 |
1 files changed, 5 insertions, 5 deletions
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) |