Avatar for the aio-libs user
aio-libs
aiohttp
BlogDocsChangelog

Remove unreachable content length check for chunked encoding

#10058Merged
Comparing
unreachable_cl_check
(
ba686c8
) with
master
(
11f0e7f
)
CodSpeed Performance Gauge
0%
Improvements
0
Regressions
0
Untouched
43
New
0
Dropped
0
Ignored
1

Benchmarks

Passed

test_send_one_hundred_websocket_text_messages[pyloop]
tests/test_benchmarks_http_websocket.py::test_send_one_hundred_websocket_text_messages[pyloop]
CodSpeed Performance Gauge
+1%
564 µs
560.7 µs
test_simple_web_stream_response
tests/test_benchmarks_web_response.py::test_simple_web_stream_response
CodSpeed Performance Gauge
+1%
250.3 µs
248.9 µs
test_resolve_multiple_fixed_url_with_many_routes[pyloop]
tests/test_benchmarks_web_urldispatcher.py::test_resolve_multiple_fixed_url_with_many_routes[pyloop]
CodSpeed Performance Gauge
0%
2.3 ms
2.3 ms
test_one_thousand_round_trip_websocket_text_messages[pyloop]
tests/test_benchmarks_client_ws.py::test_one_thousand_round_trip_websocket_text_messages[pyloop]
CodSpeed Performance Gauge
0%
17 ms
16.9 ms
test_resolve_root_route[pyloop]
tests/test_benchmarks_web_urldispatcher.py::test_resolve_root_route[pyloop]
CodSpeed Performance Gauge
0%
936 µs
932.4 µs
test_resolve_gitapi_root[pyloop]
tests/test_benchmarks_web_urldispatcher.py::test_resolve_gitapi_root[pyloop]
CodSpeed Performance Gauge
0%
2.1 ms
2.1 ms
test_load_cookies_into_temp_cookiejar
tests/test_benchmarks_cookiejar.py::test_load_cookies_into_temp_cookiejar
CodSpeed Performance Gauge
0%
207.3 µs
206.6 µs
test_one_thousand_round_trip_websocket_binary_messages[pyloop]
tests/test_benchmarks_client_ws.py::test_one_thousand_round_trip_websocket_binary_messages[pyloop]
CodSpeed Performance Gauge
0%
16.6 ms
16.5 ms
test_simple_web_response
tests/test_benchmarks_web_response.py::test_simple_web_response
CodSpeed Performance Gauge
0%
452.4 µs
451.1 µs
test_resolve_single_fixed_url_with_many_routes[pyloop]
tests/test_benchmarks_web_urldispatcher.py::test_resolve_single_fixed_url_with_many_routes[pyloop]
CodSpeed Performance Gauge
0%
938.9 µs
937.5 µs
test_serialize_headers
tests/test_benchmarks_http_writer.py::test_serialize_headers
CodSpeed Performance Gauge
0%
999.5 µs
998.2 µs
test_resolve_root_route_with_many_fixed_routes[pyloop]
tests/test_benchmarks_web_urldispatcher.py::test_resolve_root_route_with_many_fixed_routes[pyloop]
CodSpeed Performance Gauge
0%
931.7 µs
930.5 µs
test_resolve_static_root_route[pyloop]
tests/test_benchmarks_web_urldispatcher.py::test_resolve_static_root_route[pyloop]
CodSpeed Performance Gauge
0%
1.1 ms
1.1 ms
test_send_one_hundred_large_websocket_text_messages[pyloop]
tests/test_benchmarks_http_websocket.py::test_send_one_hundred_large_websocket_text_messages[pyloop]
CodSpeed Performance Gauge
0%
538.2 µs
537.6 µs
test_resolve_multiple_level_fixed_url_with_many_routes[pyloop]
tests/test_benchmarks_web_urldispatcher.py::test_resolve_multiple_level_fixed_url_with_many_routes[pyloop]
CodSpeed Performance Gauge
0%
9 ms
9 ms
test_read_large_binary_websocket_messages[pyloop]
tests/test_benchmarks_http_websocket.py::test_read_large_binary_websocket_messages[pyloop]
CodSpeed Performance Gauge
0%
9.1 ms
9.1 ms
test_send_client_request_one_hundred[pyloop]
tests/test_benchmarks_client_request.py::test_send_client_request_one_hundred[pyloop]
CodSpeed Performance Gauge
0%
2.5 ms
2.5 ms
test_one_hundred_simple_get_requests[pyloop]
tests/test_benchmarks_client.py::test_one_hundred_simple_get_requests[pyloop]
CodSpeed Performance Gauge
0%
34.5 ms
34.5 ms
test_resolve_prefix_resources_many_prefix_many_plain[pyloop]
tests/test_benchmarks_web_urldispatcher.py::test_resolve_prefix_resources_many_prefix_many_plain[pyloop]
CodSpeed Performance Gauge
0%
4.9 ms
4.9 ms
test_one_hundred_get_requests_with_512kib_content_length_payload[pyloop]
tests/test_benchmarks_client.py::test_one_hundred_get_requests_with_512kib_content_length_payload[pyloop]
CodSpeed Performance Gauge
0%
168.7 ms
168.7 ms
test_get_request_with_251308_compressed_chunked_payload[pyloop]
tests/test_benchmarks_client.py::test_get_request_with_251308_compressed_chunked_payload[pyloop]
CodSpeed Performance Gauge
0%
465 ms
464.9 ms
test_read_one_hundred_websocket_text_messages[pyloop]
tests/test_benchmarks_http_websocket.py::test_read_one_hundred_websocket_text_messages[pyloop]
CodSpeed Performance Gauge
0%
313.5 µs
313.6 µs
test_one_hundred_simple_get_requests_multiple_methods_route[pyloop]
tests/test_benchmarks_client.py::test_one_hundred_simple_get_requests_multiple_methods_route[pyloop]
CodSpeed Performance Gauge
0%
34.3 ms
34.3 ms
test_send_one_hundred_websocket_text_messages_with_mask[pyloop]
tests/test_benchmarks_http_websocket.py::test_send_one_hundred_websocket_text_messages_with_mask[pyloop]
CodSpeed Performance Gauge
0%
809.5 µs
809.9 µs
test_ten_web_middlewares[pyloop]
tests/test_benchmarks_web_middleware.py::test_ten_web_middlewares[pyloop]
CodSpeed Performance Gauge
0%
37.4 ms
37.4 ms
test_send_one_hundred_websocket_compressed_messages[pyloop]
tests/test_benchmarks_http_websocket.py::test_send_one_hundred_websocket_compressed_messages[pyloop]
CodSpeed Performance Gauge
0%
3.3 ms
3.3 ms
test_one_hundred_get_requests_with_30000_content_length_payload[pyloop]
tests/test_benchmarks_client.py::test_one_hundred_get_requests_with_30000_content_length_payload[pyloop]
CodSpeed Performance Gauge
0%
41.4 ms
41.5 ms
test_one_hundred_get_requests_with_1024_chunked_payload[pyloop]
tests/test_benchmarks_client.py::test_one_hundred_get_requests_with_1024_chunked_payload[pyloop]
CodSpeed Performance Gauge
0%
38.9 ms
39 ms
test_one_hundred_get_requests_with_1024_content_length_payload[pyloop]
tests/test_benchmarks_client.py::test_one_hundred_get_requests_with_1024_content_length_payload[pyloop]
CodSpeed Performance Gauge
0%
37.6 ms
37.6 ms
test_one_hundred_get_requests_with_30000_chunked_payload[pyloop]
tests/test_benchmarks_client.py::test_one_hundred_get_requests_with_30000_chunked_payload[pyloop]
CodSpeed Performance Gauge
0%
42.7 ms
42.8 ms
test_resolve_gitapi[pyloop]
tests/test_benchmarks_web_urldispatcher.py::test_resolve_gitapi[pyloop]
CodSpeed Performance Gauge
0%
316.5 ms
317 ms
test_resolve_gitapi_subapps[pyloop]
tests/test_benchmarks_web_urldispatcher.py::test_resolve_gitapi_subapps[pyloop]
CodSpeed Performance Gauge
0%
319.6 ms
320.4 ms
test_one_hundred_simple_post_requests[pyloop]
tests/test_benchmarks_client.py::test_one_hundred_simple_post_requests[pyloop]
CodSpeed Performance Gauge
0%
39.3 ms
39.4 ms
test_resolve_dynamic_resource_url_with_many_dynamic_routes[pyloop]
tests/test_benchmarks_web_urldispatcher.py::test_resolve_dynamic_resource_url_with_many_dynamic_routes[pyloop]
CodSpeed Performance Gauge
0%
3.7 ms
3.7 ms
test_web_response_with_bytes_body
tests/test_benchmarks_web_response.py::test_web_response_with_bytes_body
CodSpeed Performance Gauge
0%
542 µs
544.2 µs
test_web_response_with_text_body
tests/test_benchmarks_web_response.py::test_web_response_with_text_body
CodSpeed Performance Gauge
0%
660.9 µs
663.8 µs
test_resolve_dynamic_resource_url_with_many_static_routes[pyloop]
tests/test_benchmarks_web_urldispatcher.py::test_resolve_dynamic_resource_url_with_many_static_routes[pyloop]
CodSpeed Performance Gauge
-1%
3.7 ms
3.7 ms
test_resolve_dynamic_resource_url_with_many_dynamic_routes_with_common_prefix[pyloop]
tests/test_benchmarks_web_urldispatcher.py::test_resolve_dynamic_resource_url_with_many_dynamic_routes_with_common_prefix[pyloop]
CodSpeed Performance Gauge
-1%
261.6 ms
263.1 ms
test_web_response_with_headers
tests/test_benchmarks_web_response.py::test_web_response_with_headers
CodSpeed Performance Gauge
-1%
888.4 µs
893.6 µs
test_create_client_request_with_headers[pyloop]
tests/test_benchmarks_client_request.py::test_create_client_request_with_headers[pyloop]
CodSpeed Performance Gauge
-1%
69.6 µs
70 µs
test_create_client_request_with_cookies[pyloop]
tests/test_benchmarks_client_request.py::test_create_client_request_with_cookies[pyloop]
CodSpeed Performance Gauge
-1%
128.6 µs
129.4 µs
test_client_request_update_cookies[pyloop]
tests/test_benchmarks_client_request.py::test_client_request_update_cookies[pyloop]
CodSpeed Performance Gauge
-1%
173.5 µs
174.9 µs
test_one_thousand_large_round_trip_websocket_text_messages[pyloop]
tests/test_benchmarks_client_ws.py::test_one_thousand_large_round_trip_websocket_text_messages[pyloop]
CodSpeed Performance Gauge
-1%
24.4 ms
24.7 ms

Ignored

test_one_hundred_get_requests_with_512kib_chunked_payload[pyloop]Ignored
tests/test_benchmarks_client.py::test_one_hundred_get_requests_with_512kib_chunked_payload[pyloop]
CodSpeed Performance Gauge
0%
170 ms
169.9 ms

Commits

Click on a commit to change the comparison range
Base
master
11f0e7f
0%
Remove unreachable content length check for chunked encoding _prepare_headers had a check to remove content-length if chunked encoding was set. This code was unreachable under normal circumstances because enabling chunked encoding checks to see if the content-length header is there and raises RuntimeError. It was still possible to reach this code if RuntimeError was suppressed because enable_chunked_encoding set self._chunked = True before checking if it needed to raise. To make it truely unreachable, the check is now done first in enable_chunked_encoding
ba686c8
3 months ago
by bdraco
Home Terms PrivacyDocs