Zend Framework

Zend_Controller_Action_Helper_Redirector, duplicated port number if custom port used

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.10.6
  • Fix Version/s: 1.11.0
  • Component/s: Zend_Controller
  • Labels:
    None

Description

If site runs on custom port for example:
http://example.org:50000/

In the IndexController/indexAction:
$redirector = $this->_helper->getHelper('Redirector');
$redirector->setUseAbsoluteUri()->setGotoSimple('example');

You will be redirected to:
http://example.org:50000:50000/index/example

The problem is in the: Zend/Controller/Action/Helper/Redirector.php
the protected function _redirect append port number, but $_SERVER['HTTP_HOST'] contains port number too.

Activity

Hide
Marc Hodgins added a comment -

Patch with test attached.

Show
Marc Hodgins added a comment - Patch with test attached.
Hide
Matthew Weier O'Phinney added a comment -

Patch applied to trunk and 1.11 release branch – thanks!

Show
Matthew Weier O'Phinney added a comment - Patch applied to trunk and 1.11 release branch – thanks!

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: