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

Method do_GET

Lib/pydoc.py:2348–2362  ·  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

2346 class DocHandler(http.server.BaseHTTPRequestHandler):
2347
2348 def do_GET(self):
2349 """Process a request from an HTML browser.
2350
2351 The URL received is in self.path.
2352 Get an HTML page from self.urlhandler and send it.
2353 """
2354 if self.path.endswith('.css'):
2355 content_type = 'text/css'
2356 else:
2357 content_type = 'text/html'
2358 self.send_response(200)
2359 self.send_header('Content-Type', '%s; charset=UTF-8' % content_type)
2360 self.end_headers()
2361 self.wfile.write(self.urlhandler(
2362 self.path, content_type).encode('utf-8'))
2363
2364 def log_message(self, *args):
2365 # Don't log messages.

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected