Page MenuHomeSoftware Heritage

Customize the user-agent header in deposit client classes
ClosedPublic

Authored by douardda on Nov 10 2020, 6:43 PM.

Details

Summary

use a user agent like 'swh-deposit/<deposit_version>'.

Also use a requests.Session object in deposit client classes
this allows to make it easier to customize headers (eg. to customize the
user-agent).

Diff Detail

Repository
rDDEP Push deposit
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 D4459 (id=15810)

Rebasing onto b5da4cdd68...

Current branch diff-target is up to date.
Changes applied before test
commit 125c4831b4438c37340dc0cda3107e79818bf854
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Nov 10 18:39:14 2020 +0100

    Customize the user-agent header in deposit client classes
    
    use a user agent like 'swh-deposit/<deposit_version>'.

commit 3a48807eb2b0dbd97f8c610226d6fbe6c87ccd8e
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Nov 10 18:36:42 2020 +0100

    Use a requests.Session object in deposit client classes
    
    this allows to make it easier to customize headers (eg. to customize the
    user-agent).

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

This revision is now accepted and ready to land.Nov 10 2020, 6:50 PM