https://bugzilla.wikimedia.org/show_bug.cgi?id=35721

Bawolff (Brian Wolff) <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Moving files breaks         |Moving files breaks
                   |hotlinks                    |hotlinks to original file
                   |                            |asset

--- Comment #10 from Bawolff (Brian Wolff) <[email protected]> ---
Just to clarify something, this is fixed for thumbnails (e.g.
https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Rouge.svg/200px-Rouge.svg.png
redirects properly to
https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Rouge.svg/200px-Red.svg.png).
Its only the original  version of the file that breaks.

-----

Perhaps this could be fixed by, modifying upload-backend.inc.vcl
(https://git.wikimedia.org/blob/operations%2Fpuppet.git/production/templates%2Fvarnish%2Fupload-backend.inc.vcl.erb)
so that in the case an original file asset is requested, and if swift returns
404, try instead going to Special:FilePath, and if that returns a redirect,
return that.

So for example, going to
https://upload.wikimedia.org/wikipedia/commons/2/25/Rouge.svg would be
something like:
*Ask swift, swift returns 404
*Go to https://commons.wikimedia.org/wiki/Special:Redirect/file/Rouge.svg
**If that returns a 302, and the 302 is not for the current url (to avoid
loops) return that
**Otherwise return the 404 from swift (Bonus points for a more user-friendly
404 page)

[I don't know much about the bowels of varnish, so there may be things I'm
missing here]

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to