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)
Sun, Dec 8, 5:07 AM
Unknown Object (File)
Wed, Nov 27, 10:36 PM
Unknown Object (File)
Nov 18 2024, 9:42 PM
Unknown Object (File)
Nov 8 2024, 8:53 PM
Unknown Object (File)
Nov 8 2024, 8:27 PM
Unknown Object (File)
Nov 8 2024, 8:27 PM
Unknown Object (File)
Nov 8 2024, 8:27 PM
Unknown Object (File)
Nov 8 2024, 8:26 PM
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.