Skip to content

web: append filename of artifact to file endpoint

Felix Moessbauer requested to merge fmoessbauer/snapshot:fm/filenames into master

In 1aaf5d08 support was added to lookup the filename when accessing the /file endpoint and set the Content-Dispatch response header accordingly. However, that is hidden behind a feature flag as it requires a potentially costly db lookup. Further, it does not help in prod setups where the files are served directly from the farm by the webserver.

To solve this, we now append the url-encoded filename to the path (after the digest), so the webserver can decode this and set the Content-Dispatch header accordingly. In the flask endpoint we further add a consistency check that compares the provided value with what we get from the DB. This mostly helps local debugging.

Proposed-by: Philipp Kern pkern@debian.org Signed-off-by: Felix Moessbauer felix.moessbauer@siemens.com

Merge request reports

Loading