Page MenuHomeSoftware Heritage

Add support for non-ASCII filenames in api_content_raw (option 1: use FileResponse)
ClosedPublic

Authored by vlorentz on Jul 11 2022, 4:32 PM.

Details

Reviewers
anlambert
Group Reviewers
Reviewers
Maniphest Tasks
Restricted Maniphest Task
Commits
rDWAPPS4e388ee956f4: Add support for non-ASCII filenames in api_content_raw
Summary

without either RFC5987/6266-encoding of the filename or RFC2231-encoding
of the header, gunicorn crashes when trying to decode the header as ASCII.

Resolves T4388

This is an alternative implementation of D8109.

Diff Detail

Repository
rDWAPPS Web applications
Branch
content-filename-nonascii1
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 30366
Build 47472: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 47471: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D8108 (id=29280)

Rebasing onto 27663adfa4...

First, rewinding head to replay your work on top of it...
Applying: Add support for non-ASCII filenames in api_content_raw
Changes applied before test
commit ca232d2a5e0513c7b81f76b7bedbc6ac497ec3d2
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Jul 11 16:28:40 2022 +0200

    Add support for non-ASCII filenames in api_content_raw
    
    without either RFC5987/6266-encoding of the filename or RFC2231-encoding
    of the header, gunicorn crashes when trying to decode the header as ASCII.

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

Build is green

Patch application report for D8108 (id=29282)

Rebasing onto 27663adfa4...

First, rewinding head to replay your work on top of it...
Applying: Add support for non-ASCII filenames in api_content_raw
Changes applied before test
commit fb8049e47ea5f08105369921bf944f4a35a05523
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Jul 11 16:28:40 2022 +0200

    Add support for non-ASCII filenames in api_content_raw
    
    without either RFC5987/6266-encoding of the filename or RFC2231-encoding
    of the header, gunicorn crashes when trying to decode the header as ASCII.

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

don't reimplement BytesIO; it intelligently avoids the copy on its own already.

Build is green

Patch application report for D8108 (id=29291)

Rebasing onto 27663adfa4...

Current branch diff-target is up to date.
Changes applied before test
commit 4e388ee956f4b91c676d470f73e1d18737542c4d
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Jul 11 16:28:40 2022 +0200

    Add support for non-ASCII filenames in api_content_raw
    
    without either RFC5987/6266-encoding of the filename or RFC2231-encoding
    of the header, gunicorn crashes when trying to decode the header as ASCII.

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

anlambert added a subscriber: anlambert.

Looks good to me, thanks !

This revision is now accepted and ready to land.Jul 11 2022, 6:45 PM