system-config/playbooks/roles/mirror/files
Jeremy Stanley e61f584dbc Override DOCTYPE in wheel cache autoindex
As of pip 22.0, its HTML parser no longer accepts any page which
doesn't start with the string "<!DOCTYPE html>" and, unfortunately,
Apache's mod_autoindex declares a very specific HTML 3.2 doctype
instead, causing pip to break any time our wheel cache is added to
its indices. The main index we generate has been updated with
https://review.opendev.org/826969 but we need this change to address
Apache's dynamically generated file lists for that site.

Configure Apache to supply a custom header file for file indices
within the /wheel/ subtree of our mirror vhosts, and alias it from
outside the docroot in order to reduce clutter of the top-level
directory index. Also instruct mod_autoindex to omit its own
document preamble which would otherwise include the original doctype
declaration. Note that this omits the header title and H1 level
headings from the resulting pages, but as these are only meant for
machine parsing anyway and not humans, it's a compromise to keep the
solution as simple and straightforward as possible.

Change-Id: Id71174954b13b80483256d37f773b781f4956c21
2022-01-30 18:54:12 +00:00
..
apache-connection-tuning Set connection limits on mirror apache workers 2020-05-13 13:46:38 -07:00
robots.txt Create opendev mirrors 2019-05-21 11:08:25 +10:00
wheel_header.html Override DOCTYPE in wheel cache autoindex 2022-01-30 18:54:12 +00:00