Page MenuHomeSoftware Heritage

Add support for uppercase sha1 url arguments in webapp endpoints
Closed, MigratedEdits Locked

Description

Currently passing a sha1 as url argument to the webapp endpoints works only if it is in lowercase form.

If a sha1 is passed in uppercase form, we end up in a 404 error page (see [1] for instance).

For commodity of use, we should support passing sha1s in uppercase form but also with
mixed uppercase and lowercase parts.

Redirecting to the lowercase sha1 endpoints when such cases are encountered seems the
right way to implement this.

[1] https://archive.softwareheritage.org/browse/snapshot/1A8893E6A86F444E8BE8E7BDA6CB34FB1735A00E/

Event Timeline

anlambert renamed this task from Add support for sha1 url arguments in uppercase form in webapp endpoints to Add support for uppercase sha1 url arguments in webapp endpoints.Jan 30 2019, 5:32 PM
anlambert triaged this task as Normal priority.
anlambert created this task.

Redirecting to the lowercase sha1 endpoints when such cases are encountered seems the right way to implement this.

Or convert the sha1 to lowercase, as implemented in D1285, which sounds simpler and with less maintenance ;)