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

Function guess_scheme

Lib/wsgiref/util.py:29–35  ·  view source on GitHub ↗

Return a guess for whether 'wsgi.url_scheme' should be 'http' or 'https'

(environ)

Source from the content-addressed store, hash-verified

27 raise StopIteration
28
29def guess_scheme(environ):
30 """Return a guess for whether 'wsgi.url_scheme' should be 'http' or 'https'
31 """
32 if environ.get("HTTPS") in ('yes','on','1'):
33 return 'https'
34 else:
35 return 'http'
36
37def application_uri(environ):
38 """Return the application's base URI (no PATH_INFO or QUERY_STRING)"""

Callers 2

setup_testing_defaultsFunction · 0.85
get_schemeMethod · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…