Issues

ZF-2821: Zend_Controller_Action_Helper_Redirector makes redirection using relative HTTP path

Description

Redirector helper makes relative redirect by default, despite the fact the HTTP specs forbid relative URLs in HTTP redirects. Redirects should be always to ubsolute URLs.

Comments

Please categorize/fix as needed.

Scheduling for next minor release.

I can give a shot at it if you like, Matthew.

I have moved url view helper logic to router, so setGotoRoute should also be changed at the same time.

The problem with fixing this issue is due to determining the server protocol, name, and port. The information in the $_SERVER superglobal is somewhat unreliable due to the fact that some keys vary from server to server, others are open to header injection, and others may be incorrect due to proxying. Additionally, if you are pregenerating content, having the various URL helpers set the fully qualified URL could have a negative impact as the incorrect protocol, server, and/or port could be selected during generation.

At best, this would have to be an opt-in behavior.

While I realize that the HTTP spec requires fully qualified URLs, I do not know of any clients that are unable to follow them; can the reporter please provide some background on a real-world technical need for this request?

Updated priorities; unsure how necessary this "fix" is.

No response from original author for 3+ years