Parameters for `.HTTP1Connection` and `.HTTP1ServerConnection`.
| 74 | |
| 75 | |
| 76 | class HTTP1ConnectionParameters: |
| 77 | """Parameters for `.HTTP1Connection` and `.HTTP1ServerConnection`.""" |
| 78 | |
| 79 | def __init__( |
| 80 | self, |
| 81 | no_keep_alive: bool = False, |
| 82 | chunk_size: Optional[int] = None, |
| 83 | max_header_size: Optional[int] = None, |
| 84 | header_timeout: Optional[float] = None, |
| 85 | max_body_size: Optional[int] = None, |
| 86 | body_timeout: Optional[float] = None, |
| 87 | decompress: bool = False, |
| 88 | ) -> None: |
| 89 | """ |
| 90 | :arg bool no_keep_alive: If true, always close the connection after |
| 91 | one request. |
| 92 | :arg int chunk_size: how much data to read into memory at once |
| 93 | :arg int max_header_size: maximum amount of data for HTTP headers |
| 94 | :arg float header_timeout: how long to wait for all headers (seconds) |
| 95 | :arg int max_body_size: maximum amount of data for body |
| 96 | :arg float body_timeout: how long to wait while reading body (seconds) |
| 97 | :arg bool decompress: if true, decode incoming |
| 98 | ``Content-Encoding: gzip`` |
| 99 | """ |
| 100 | self.no_keep_alive = no_keep_alive |
| 101 | self.chunk_size = chunk_size or 65536 |
| 102 | self.max_header_size = max_header_size or 65536 |
| 103 | self.header_timeout = header_timeout |
| 104 | self.max_body_size = max_body_size |
| 105 | self.body_timeout = body_timeout |
| 106 | self.decompress = decompress |
| 107 | |
| 108 | |
| 109 | class HTTP1Connection(httputil.HTTPConnection): |
no outgoing calls
no test coverage detected