Refs: https://codeberg.org/forgejo/forgejo/pulls/2222
(cherry picked from commit 5f837efc15f3d1e0d7fbed7fc569251143266584)
fix: write xml header
(cherry picked from commit a715984a42be9da81c48106d5eae244098ac1108)
fix: optional elements and xml schema
(cherry picked from commit 6ea6895a3616246e7282aa20d8f010fa931b60ea)
fix: pass all other requests to file search
(cherry picked from commit 9bfc74833a3b657453b4519573598432a87e3e3c)
test: add integration test
(cherry picked from commit b798f4ce86daa78e694c5c142e6f5f44938e6cb6)
fix: use xmlResponse
(cherry picked from commit 7f76df0b246c64fac0eeb115642c8cb6eb676f36)
(cherry picked from commit e18d574ca40905aec52fbbe8247ba83fd01874dd)