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

Method handle_expect_100

Lib/http/server.py:409–425  ·  view source on GitHub ↗

Decide what to do with an "Expect: 100-continue" header. If the client is expecting a 100 Continue response, we must respond with either a 100 Continue or a final response before waiting for the request body. The default is to always respond with a 100 Continue. You

(self)

Source from the content-addressed store, hash-verified

407 return True
408
409 def handle_expect_100(self):
410 """Decide what to do with an "Expect: 100-continue" header.
411
412 If the client is expecting a 100 Continue response, we must
413 respond with either a 100 Continue or a final response before
414 waiting for the request body. The default is to always respond
415 with a 100 Continue. You can behave differently (for example,
416 reject unauthorized requests) by overriding this method.
417
418 This method should either return True (possibly after sending
419 a 100 Continue response) or send an error response and return
420 False.
421
422 """
423 self.send_response_only(HTTPStatus.CONTINUE)
424 self.end_headers()
425 return True
426
427 def handle_one_request(self):
428 """Handle a single HTTP request.

Callers 1

parse_requestMethod · 0.95

Calls 2

send_response_onlyMethod · 0.95
end_headersMethod · 0.95

Tested by

no test coverage detected