Page MenuHomeSoftware Heritage

browse: Use django FileResponse in browse-content-raw view
ClosedPublic

Authored by anlambert on Mon, Nov 14, 1:43 PM.

Details

Reviewers
vlorentz
Group Reviewers
Reviewers
Maniphest Tasks
Restricted Maniphest Task
Commits
rDWAPPSad8558c69d88: browse: Use django FileResponse in browse-content-raw view
Summary

Instead of manually setting some HTTP headers, prefer to use django
FileResponse class that set those.

It fixes the download of raw files with non ascii filenames.

Fixes SWH-WEBAPP-3YS.

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D8836 (id=31848)

Rebasing onto ed38856c60...

Current branch diff-target is up to date.
Changes applied before test
commit ad8558c69d882a8a4453c7c6e04b4aeac384ec0d
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Nov 14 13:41:07 2022 +0100

    browse: Use django FileResponse in browse-content-raw view
    
    Instead of manually setting some HTTP headers, prefer to use django
    FileResponse class that set those.
    
    It fixes the download of raw files with non ascii filenames.

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/2129/ for more details.

vlorentz added a task: Restricted Maniphest Task.Mon, Nov 14, 2:23 PM
This revision is now accepted and ready to land.Mon, Nov 14, 2:26 PM