Page MenuHomePhabricator

url rewriting 302 redirects do not respect custom port
Closed, ResolvedPublic


When a user types in a URL that lacks a trailing / phab will send a 302 redirect to the URL with the /.

My installation uses a custom port and during the redirect the port is removed (and so defaults to 80).

A relatively recent version of the HTTP spec now allows relative URLs in 302 redirects but if you don't want that it should at least use the correct absolute url.

Steps to reproduce:

  1. type in a phab url including a custom port: - note the missing trailing /
  2. I am redirected to without my custom port and the connection is refused by the host

phabricator 901e3051351dec3c041c683b6d1e718e587e2b4b (Sat, Dec 17)
arcanist fad85844314b151994769a461825c90f7400c145 (Oct 21 2016)
phutil 5ac2ca1214890d865bc57fab2715a322fdf02ab6 (Tue, Dec 6)

Event Timeline

Have you forked phabricator ? Your commit sha (901e3051351dec3c041c683b6d1e718e587e2b4b) is not recognized in this install.

epriestley triaged this task as Normal priority.

I was able to reproduce this at HEAD and D17134 should fix it, but please make sure future issues you report are against upstream code -- not forked local code -- and that your install is up to date. Many issues are already fixed by the time they are reported, and we are powerless to troubleshoot issues with local code even if we wanted to.