MCPcopy Index your code
hub / github.com/RustPython/RustPython / do_GET

Method do_GET

Lib/pydoc.py:2396–2410  ·  view source on GitHub ↗

Process a request from an HTML browser. The URL received is in self.path. Get an HTML page from self.urlhandler and send it.

(self)

Source from the content-addressed store, hash-verified

2394 class DocHandler(http.server.BaseHTTPRequestHandler):
2395
2396 def do_GET(self):
2397 """Process a request from an HTML browser.
2398
2399 The URL received is in self.path.
2400 Get an HTML page from self.urlhandler and send it.
2401 """
2402 if self.path.endswith('.css'):
2403 content_type = 'text/css'
2404 else:
2405 content_type = 'text/html'
2406 self.send_response(200)
2407 self.send_header('Content-Type', '%s; charset=UTF-8' % content_type)
2408 self.end_headers()
2409 self.wfile.write(self.urlhandler(
2410 self.path, content_type).encode('utf-8'))
2411
2412 def log_message(self, *args):
2413 # Don't log messages.

Callers

nothing calls this directly

Calls 6

send_responseMethod · 0.80
send_headerMethod · 0.80
end_headersMethod · 0.80
endswithMethod · 0.45
writeMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected