Method: flask.helpers._prepare_send_file_kwargs
Calls: 20, Exceptions: 0, Paths: 2Back
Path 1: 15 calls (0.75)
{'max_age': None} (10) dict (4) {} (1)
dict (15)
1def _prepare_send_file_kwargs(**kwargs: t.Any) -> dict[str, t.Any]:
2 if kwargs.get("max_age") is None:
3 kwargs["max_age"] = current_app.get_send_file_max_age
4
5 kwargs.update(
6 environ=request.environ,
7 use_x_sendfile=current_app.config["USE_X_SENDFILE"],
8 response_class=current_app.response_class,
9 _root_path=current_app.root_path, # type: ignore
10 )
11 return kwargs
Path 2: 5 calls (0.25)
{'max_age': 3600} (3) {'max_age': 100} (1) {'max_age': 10} (1)
dict (5)
1def _prepare_send_file_kwargs(**kwargs: t.Any) -> dict[str, t.Any]:
2 if kwargs.get("max_age") is None:
3 kwargs["max_age"] = current_app.get_send_file_max_age
4
5 kwargs.update(
6 environ=request.environ,
7 use_x_sendfile=current_app.config["USE_X_SENDFILE"],
8 response_class=current_app.response_class,
9 _root_path=current_app.root_path, # type: ignore
10 )
11 return kwargs