Page MenuHomePhabricator

Gitblit links not redirecting to the correct moved resource unless .git is part of repo name in url
Closed, DeclinedPublic

Description

https://github.com/wikimedia/texvcjs (README.md) links to https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FMath/REL1_23/texvccheck%2FREADME

which is now not the requested resource at all, but is a Phabricator diffusion start page (https://phabricator.wikimedia.org/diffusion/). It is not appropriate to use '301 Moved Permanently' in this scenario.

Event Timeline

Danny_B triaged this task as Medium priority.Jun 30 2016, 10:23 AM
Danny_B added a project: SRE.

The issue is, that the link is not 100% correct. It's missing .git after the repo name. https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FMath.git/REL1_23/texvccheck%2FREADME works.

I don't know how such links became alive, but my spider didn't find them on Gitblit page itself, thus they are perhaps some sort of "syntactic sugar / short(er) / cool(er) URLs" added OR leftovers from past when the .git extension hasn't been used. (I am not familiar with Gitblit history, just assuming on the base of the spider results.)

For the time being it would be useful to add some monitoring/logging of URLs being redirected to the Diffusion main page and their referers (cc SRE) to find out referers we can correct somehow and (undocumented) URLs like this to see if they can be added to redirect rules as well.

Thanks. However, that solves only this particular case in this moment.
For future we need some more versatile solution like those I've suggested earlier.

jayvdb renamed this task from gitblit blobs not redirecting to the correct moved resource to gitblit blobs not redirecting to the correct moved resource unless .git is part of repo in url.Jun 30 2016, 11:00 AM
mmodell subscribed.

I don't think we need to care about redirecting ancient / malformed urls.

Danny_B renamed this task from gitblit blobs not redirecting to the correct moved resource unless .git is part of repo in url to Gitblit links not redirecting to the correct moved resource unless .git is part of repo name in url.Aug 11 2016, 11:56 AM