Fix a crash in DownloadDiffAction for 404 pages.
Review Request #13321 — Created Oct. 9, 2023 and submitted
DownloadDiffActioninspects the current resolved URL in order to
determine its state. This assumes that a resolver match was made, which
isn't the case when displaying an error page, such as a 404.
The code has been rewritten to first pull out
HttpRequest, which exposes the typing problem around the resolver
match. It then checks the match before assuming it's not
Visited a 404 page. Saw that I no longer hit the crash.