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

Method handle

Lib/wsgiref/simple_server.py:111–130  ·  view source on GitHub ↗

Handle a single HTTP request

(self)

Source from the content-addressed store, hash-verified

109 return sys.stderr
110
111 def handle(self):
112 """Handle a single HTTP request"""
113
114 self.raw_requestline = self.rfile.readline(65537)
115 if len(self.raw_requestline) > 65536:
116 self.requestline = ''
117 self.request_version = ''
118 self.command = ''
119 self.send_error(414)
120 return
121
122 if not self.parse_request(): # An error code has been sent, just exit
123 return
124
125 handler = ServerHandler(
126 self.rfile, self.wfile, self.get_stderr(), self.get_environ(),
127 multithread=False,
128 )
129 handler.request_handler = self # backpointer for logging
130 handler.run(self.server.get_app())
131
132
133

Callers

nothing calls this directly

Calls 9

get_stderrMethod · 0.95
get_environMethod · 0.95
lenFunction · 0.85
ServerHandlerClass · 0.85
send_errorMethod · 0.80
parse_requestMethod · 0.80
get_appMethod · 0.80
readlineMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected