Add print statements to dump DAV input/output.
Jelmer Vernooij
3 years ago
1201 | 1201 | |
1202 | 1202 | def _send_xml_response(start_response, status, et, out_encoding): |
1203 | 1203 | body_type = 'text/xml; charset="%s"' % out_encoding |
1204 | print("OUT: " + ET.tostring(et).decode('utf-8')) | |
1204 | 1205 | body = ET.tostringlist(et, encoding=out_encoding) |
1205 | 1206 | start_response(status, [ |
1206 | 1207 | ('Content-Type', body_type), |
1313 | 1314 | if base_content_type not in ('text/xml', 'application/xml'): |
1314 | 1315 | raise UnsupportedMediaType(content_type) |
1315 | 1316 | body = b''.join(_readBody(environ)) |
1317 | print("IN: " + body.decode('utf-8')) | |
1316 | 1318 | try: |
1317 | 1319 | et = xmlparse(body) |
1318 | 1320 | except ET.ParseError: |