Page MenuHomeSoftware Heritage

Deal properly with header response
ClosedPublic

Authored by ardumont on May 25 2021, 6:10 PM.

Details

Summary

Fixes the current issue with the new collection listing endpoint [1]. Checking
the docs [2], it was badly done so far.

This also fixes other inappropriately set or get response headers in the deposit code
base (both production and tests).

[1] https://sentry.softwareheritage.org/share/issue/919e0881b3094bcdbf112131615ac05f/

[2] https://docs.djangoproject.com/en/2.2/ref/request-response/#setting-headers

Related to T2996

Test Plan

tox

Hot fix in staging instance and it's fine (see P1052)

Diff Detail

Repository
rDDEP Push deposit
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 21640
Build 33633: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 33632: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D5783 (id=20676)

Rebasing onto 3a23a50c35...

Current branch diff-target is up to date.
Changes applied before test
commit df680cc8c31738ae443a4d8a5993f4d77ff37cfd
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue May 25 18:08:04 2021 +0200

    Deal properly with header response
    
    Related to T2996

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

This revision is now accepted and ready to land.May 25 2021, 11:17 PM
This revision was automatically updated to reflect the committed changes.