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

Method handle_expect_100

Lib/http/server.py:437–453  ·  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

435 return True
436
437 def handle_expect_100(self):
438 """Decide what to do with an "Expect: 100-continue" header.
439
440 If the client is expecting a 100 Continue response, we must
441 respond with either a 100 Continue or a final response before
442 waiting for the request body. The default is to always respond
443 with a 100 Continue. You can behave differently (for example,
444 reject unauthorized requests) by overriding this method.
445
446 This method should either return True (possibly after sending
447 a 100 Continue response) or send an error response and return
448 False.
449
450 """
451 self.send_response_only(HTTPStatus.CONTINUE)
452 self.end_headers()
453 return True
454
455 def handle_one_request(self):
456 """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