Files
34e018d16c Fix: mock OSS registry server serves file bytes directly instead of through html/template (#7297)
* Fix: mock OSS registry server serves file bytes directly instead of through html/template

ossHandler parsed static file content as a Go template before serving
it, with no placeholders actually used anywhere. On a parse failure
the error branch didn't stop execution and fell through to the
success render right after. Turns out worse than that: Parse returns
a nil *Template on failure, so Execute on it panics.

Drops the templating, writes bytes directly. Added tests, including
a fixture that reproduces the parse failure; confirmed it panics on
the old code and passes with the fix.

Fixes #7296

Signed-off-by: sakirr05 <sakirahmed75531@gmail.com>

* Chore: retrigger CI

Signed-off-by: sakirr05 <sakirahmed75531@gmail.com>

---------

Signed-off-by: sakirr05 <sakirahmed75531@gmail.com>
Co-authored-by: sakirr05 <sakirahmed75531@gmail.com>
2026-08-12 11:32:08 +01:00
..