Is it possible to implement this recommendation regarding redirection:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
10.3.3 302 FOUND and 10.3.4 303 SEE OTHER

    The temporary URI SHOULD be given by the Location field
    in the response. Unless the request method was HEAD, the
    entity of the response SHOULD contain a short hypertext
    note with a hyperlink to the new URI(s).


It looks to me like Zend_Controller_Action_Helper_Redirector
ultimately gets to redirectAndExit() which calls
$this->getResponse()->sendHeaders(); and then exits. It doesn't appear
ANY body gets sent, so it doesn't look to me like calling
$this->getResponse()->setBody(...) in a controller before calling
$this->_helper->redirector(...) would make any difference.

Is this something the framework should be doing itself inside
redirectAndExit()? (If so, I can't tell how that method would know the
url necessary to build the "short hypertext note", unless it parsed
though the headers looking for a Location header.)

Since most browsers follow the redirection automatically as soon as
they see the response status code and the Location header, this isn't
a very big deal, but since it is part HTTP/1.1 standard, I was
wondering if it was possible to implement the behavior in the ZF MVC.

Andrew

Reply via email to