mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
S3Controller carried the website endpoint's index resolution, folder redirect, exact-object precedence and error-document fallback, reading the raw Vert.x request path to do it. Introduce S3Service.WebsiteResolution and resolveWebsiteRequest/resolveWebsiteError so the service decides what to serve and the controller only renders it as HTTP. The controller keeps the one thing it alone can answer — whether the client asked for a directory — and passes it in, so S3Service stays free of jakarta.ws.rs and io.vertx types. Fold the duplicated isWebsiteErrorDocumentTrigger predicate into the service as the single source of truth, and drop an unreachable xmlErrorResponse fallback (serveErrorDocument never returned null). Behaviour is unchanged: S3WebsiteIntegrationTest's 25 tests pass untouched. Add 11 S3ServiceTest cases covering the policy directly, which now needs no HTTP layer to exercise. Closes #2140