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

Method do_GET

Lib/test/test_urllib2_localnet.py:232–243  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

230 self.end_headers()
231
232 def do_GET(self):
233 if not self.headers.get("Authorization", ""):
234 self.do_AUTHHEAD()
235 self.wfile.write(b"No Auth header received")
236 elif self.headers.get(
237 "Authorization", "") == "Basic " + self.ENCODED_AUTH:
238 self.send_response(200)
239 self.end_headers()
240 self.wfile.write(b"It works")
241 else:
242 # Request Unauthorized
243 self.do_AUTHHEAD()
244
245
246

Callers

nothing calls this directly

Calls 5

do_AUTHHEADMethod · 0.95
send_responseMethod · 0.80
end_headersMethod · 0.80
getMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected