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

Method do_GET

Lib/xmlrpc/server.py:914–936  ·  view source on GitHub ↗

Handles the HTTP GET request. Interpret all HTTP GET requests as requests for server documentation.

(self)

Source from the content-addressed store, hash-verified

912 return fp.read()
913
914 def do_GET(self):
915 """Handles the HTTP GET request.
916
917 Interpret all HTTP GET requests as requests for server
918 documentation.
919 """
920 # Check that the path is legal
921 if not self.is_rpc_path_valid():
922 self.report_404()
923 return
924
925 if self.path.endswith('.css'):
926 content_type = 'text/css'
927 response = self._get_css(self.path)
928 else:
929 content_type = 'text/html'
930 response = self.server.generate_html_documentation().encode('utf-8')
931
932 self.send_response(200)
933 self.send_header('Content-Type', '%s; charset=UTF-8' % content_type)
934 self.send_header("Content-length", str(len(response)))
935 self.end_headers()
936 self.wfile.write(response)
937
938class DocXMLRPCServer( SimpleXMLRPCServer,
939 XMLRPCDocGenerator):

Callers

nothing calls this directly

Calls 11

_get_cssMethod · 0.95
strFunction · 0.85
is_rpc_path_validMethod · 0.80
report_404Method · 0.80
send_responseMethod · 0.80
send_headerMethod · 0.80
endswithMethod · 0.45
encodeMethod · 0.45
end_headersMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected