Summary: | sys-apps/portage: binhost https If-Modified-Since header support | ||
---|---|---|---|
Product: | Portage Development | Reporter: | ge1ger |
Component: | Enhancement/Feature Requests | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | InVCS |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 627566, 668302 |
Description
ge1ger
2017-07-15 21:02:50 UTC
For http protocol, we already support the If-Modified-Since header: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e06cb6d66db37ac7ab77acf65038b1f770c13c96 For https protocol, If-Modified-Since support has been disabled since bug 469888: https://gitweb.gentoo.org/proj/portage.git/commit/?id=b5969af9f575e4e4b669f44e76ad01f0dbc2dd27 Will date-checking work for https binhosts in the future? There's the following solution for having cache in https: https://p.sicp.me/bCETD.bash FETCHCOMMAND_HTTP="curlcache.sh \"\${URI}\" \"\${DISTDIR}/\${FILE}\"" Correction: FETCHCOMMAND_HTTPS="curlcache.sh \"\${URI}\" \"\${DISTDIR}/\${FILE}\"" Since python 2.7.9/3.4.3, python libraries perform ssl certificate and hostname checks by default: https://docs.python.org/2/library/httplib.html#httplib.HTTPSConnection https://docs.python.org/3/library/http.client.html#http.client.HTTPSConnection This means that we can apply our existing If-Modified-Since support to https, as long as the python version is new enough. I've got a patch here: https://github.com/zmedico/portage/tree/bug_625246 Patch posted for review: https://archives.gentoo.org/gentoo-portage-dev/message/16a4da7f3eb2246a027e6b2c5c0a28da https://github.com/gentoo/portage/pull/183 This is in the master branch: https://gitweb.gentoo.org/proj/portage.git/commit/?id=1d821469d6b72ce051b02908f17302c500945788 |