fix(api): tell the service that the client sent a cookie jar

A service that picks its auth path in init could only check the server's cookies directory, so a client-sent jar was invisible and the service fell back to the wrong path. The ctx now carries cookies_supplied, and a malformed cookie blob answers 400 instead of 500.
This commit is contained in:
imSp4rky
2026-09-07 13:20:55 -06:00
parent bbd26a2dc3
commit b8c78c1a82
3 changed files with 158 additions and 48 deletions
@@ -167,7 +167,7 @@ def test_setup_list_service_threads_request(monkeypatch):
monkeypatch.setattr(handlers, "load_service_yaml", lambda service: {})
monkeypatch.setattr(handlers, "resolve_handler_proxy", fake_resolve)
monkeypatch.setattr(handlers, "load_full_cdm", lambda *args: None)
monkeypatch.setattr(handlers, "build_parent_ctx", lambda *args: None)
monkeypatch.setattr(handlers, "build_parent_ctx", lambda *args, **kwargs: None)
monkeypatch.setattr(handlers.Services, "load", lambda service: None)
monkeypatch.setattr(handlers, "instantiate_service", lambda *args: FakeService())
monkeypatch.setattr("unshackle.commands.dl.dl.get_cookie_jar", staticmethod(lambda service, profile: None))