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

Method _validate_status

Lib/wsgiref/handlers.py:252–260  ·  view source on GitHub ↗
(self, status)

Source from the content-addressed store, hash-verified

250 return self.write
251
252 def _validate_status(self, status):
253 if _name_disallowed_re.search(status):
254 raise ValueError("Control characters are not allowed in status")
255 if len(status) < 4:
256 raise AssertionError("Status must be at least 4 characters")
257 if not status[:3].isdigit():
258 raise AssertionError("Status message must begin w/3-digit code")
259 if status[3] != " ":
260 raise AssertionError("Status message must have a space after code")
261
262 def _convert_string_type(self, value, title):
263 """Convert/check value type."""

Callers 1

start_responseMethod · 0.95

Calls 2

isdigitMethod · 0.80
searchMethod · 0.45

Tested by

no test coverage detected