Page MenuHomePhabricator

Provide a more informative alternative to 404 on invalid shortened Phurl URL
ClosedPublic

Authored by lpriestley on Nov 9 2015, 10:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 7, 5:23 AM
Unknown Object (File)
Fri, May 3, 2:46 AM
Unknown Object (File)
Mon, Apr 29, 2:27 PM
Unknown Object (File)
Sun, Apr 28, 11:17 PM
Unknown Object (File)
Wed, Apr 24, 10:28 PM
Unknown Object (File)
Apr 11 2024, 7:34 AM
Unknown Object (File)
Mar 29 2024, 2:41 PM
Unknown Object (File)
Mar 10 2024, 1:54 AM
Subscribers

Details

Summary

When accessing an invalid URL on the short Phurl domain, users should see informative message

Test Plan

Open URL in the previously configured Phurl short domain such as https://www.zz.us and see dialog with message. Open https://www.zz.us/u/123 for a valid U123 Phurl and access destination URL.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lpriestley retitled this revision from to Provide a more informative alternative to 404 on invalid shortened Phurl URL.
lpriestley updated this object.
lpriestley edited the test plan for this revision. (Show Details)
lpriestley added a reviewer: epriestley.
epriestley edited edge metadata.

Very minor, but we should probably set the HTTP response code to 404 on these. You should be able to do something like this:

$dialog = $this->newDialog()
  ->...

return id(new AphrontDialogResponse())
  ->setDialog($dialog)
  ->setResponseCode(404);
This revision is now accepted and ready to land.Nov 9 2015, 10:40 PM
lpriestley edited edge metadata.

Setting http response code on 'invalid url' dialog

This revision was automatically updated to reflect the committed changes.