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

Function start_response_wrapper

Lib/wsgiref/validate.py:159–176  ·  view source on GitHub ↗
(*args, **kw)

Source from the content-addressed store, hash-verified

157 start_response_started = []
158
159 def start_response_wrapper(*args, **kw):
160 assert_(len(args) == 2 or len(args) == 3, (
161 "Invalid number of arguments: %s" % (args,)))
162 assert_(not kw, "No keyword arguments allowed")
163 status = args[0]
164 headers = args[1]
165 if len(args) == 3:
166 exc_info = args[2]
167 else:
168 exc_info = None
169
170 check_status(status)
171 check_headers(headers)
172 check_content_type(status, headers)
173 check_exc_info(exc_info)
174
175 start_response_started.append(None)
176 return WriteWrapper(start_response(*args))
177
178 environ['wsgi.input'] = InputWrapper(environ['wsgi.input'])
179 environ['wsgi.errors'] = ErrorWrapper(environ['wsgi.errors'])

Callers

nothing calls this directly

Calls 7

assert_Function · 0.85
check_statusFunction · 0.85
check_headersFunction · 0.85
check_content_typeFunction · 0.85
check_exc_infoFunction · 0.85
WriteWrapperClass · 0.85
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…