MCPcopy Index your code
hub / github.com/python/cpython / decode_request_content

Method decode_request_content

Lib/xmlrpc/server.py:537–552  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

535 self.wfile.write(response)
536
537 def decode_request_content(self, data):
538 #support gzip encoding of request
539 encoding = self.headers.get("content-encoding", "identity").lower()
540 if encoding == "identity":
541 return data
542 if encoding == "gzip":
543 try:
544 return gzip_decode(data)
545 except NotImplementedError:
546 self.send_response(501, "encoding %r not supported" % encoding)
547 except ValueError:
548 self.send_response(400, "error decoding gzip content")
549 else:
550 self.send_response(501, "encoding %r not supported" % encoding)
551 self.send_header("Content-length", "0")
552 self.end_headers()
553
554 def report_404 (self):
555 # Report a 404 error

Callers 1

do_POSTMethod · 0.95

Calls 6

gzip_decodeFunction · 0.90
send_responseMethod · 0.80
send_headerMethod · 0.80
lowerMethod · 0.45
getMethod · 0.45
end_headersMethod · 0.45

Tested by

no test coverage detected