Code Repositories xandikos / 4e4cbf7
Add print statements to dump DAV input/output. Jelmer Vernooń≥ 2 years ago
1 changed file(s) with 2 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
12011201
12021202 def _send_xml_response(start_response, status, et, out_encoding):
12031203 body_type = 'text/xml; charset="%s"' % out_encoding
1204 print("OUT: " + ET.tostring(et).decode('utf-8'))
12041205 body = ET.tostringlist(et, encoding=out_encoding)
12051206 start_response(status, [
12061207 ('Content-Type', body_type),
13131314 if base_content_type not in ('text/xml', 'application/xml'):
13141315 raise UnsupportedMediaType(content_type)
13151316 body = b''.join(_readBody(environ))
1317 print("IN: " + body.decode('utf-8'))
13161318 try:
13171319 et = xmlparse(body)
13181320 except ET.ParseError: