zendframework / zend-mvc

Mvc component from Zend Framework
BSD 3-Clause "New" or "Revised" License
105 stars 90 forks source link

AbstractRestfulController does not set the Allow headers. #167

Open GeeH opened 8 years ago

GeeH commented 8 years ago

This issue has been moved from the zendframework repository as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html


Original Issue: https://api.github.com/repos/zendframework/zendframework/issues/7674 User: @parkbot Created On: 2016-02-19T00:12:44Z Updated At: 2016-02-21T18:14:38Z Body https://tools.ietf.org/html/rfc7231#section-6.5.5

States a 405 response Must set the Allow header. The controller needs to have a method by which the allow headers are set when a 405 is returned.

Overriding each function just to get the controller to work properly seems like over kill.

Perhaps have an abstract function getAllowedMethods that returns an array of allowed methods that get populated when a 405 has been set?


michalbundyra commented 4 years ago

This repository has been closed and moved to laminas/laminas-mvc; a new issue has been opened at laminas/laminas-mvc#35.