You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like something has changed about either Requests or the Wayback Machine, and we are no longer including all the original archived headers in a Memento object’s headers property. For example:
At a quick glance, it looks like archive.org has started returning x-archive-orig-* headers with lower-case header names, and we are looking for capitalized ones (which they used to be):
I’m guessing this started happening when they added HTTP/2 support (in HTTP/2, all header names are lower-case). That said, we can’t just switch to looking for lower-case here, since archive.org’s HTTP/1.1 responses still include upper-cased names for standard headers like Date and Location.
This fixes#98, which was caused by two changes:
1. The Internet Archive now returns most *archived* header names (i.e. those prefixed with 'x-archive-org-') in lower-case.
2. In HTTP/2 (now possible since we are using HTTPS as of #97), *all* headers are lower-case/case-insensitive.
This also meant I needed to make the `Memento.headers` attribute case-insensitive. I've implemented that using code largely taken from Requests, since their implementation is not public so we can't just use it directly (plus we plan to switch of Requests at some point anyway).
It looks like something has changed about either Requests or the Wayback Machine, and we are no longer including all the original archived headers in a Memento object’s
headers
property. For example:But the value of
memento.headers
should really be something like:(Based on https://web.archive.org/web/20220315020402id_/http://robbrackett.com/)
The text was updated successfully, but these errors were encountered: