fix(lora-manager): sanitize header limit overrides

This commit is contained in:
pixelpaws
2025-10-23 11:13:31 +08:00
parent 13433f8cd2
commit 3244a5f1a1
4 changed files with 55 additions and 2 deletions

View File

@@ -84,6 +84,15 @@ async def test_standalone_server_sets_up_routes(tmp_path, standalone_module):
assert server.app.on_shutdown, "shutdown callbacks must be attached"
def test_standalone_server_raises_header_limits(standalone_module):
"""``StandaloneServer`` configures ``handler_args`` to tolerate large headers."""
server = standalone_module.StandaloneServer()
assert server.app._handler_args["max_field_size"] == standalone_module.HEADER_SIZE_LIMIT
assert server.app._handler_args["max_line_size"] == standalone_module.HEADER_SIZE_LIMIT
def test_validate_settings_warns_for_missing_model_paths(caplog, standalone_module):
"""Missing model folders trigger the configuration warning."""