#6522: Missing code + functionality in /libs/controller/controller.php
--+-
Reporter: euromark | Type: Enhancement
Status: new| Priority: Low
Milestone: 1.3.x.x| Component: Core Libs
Version: 1.2 Final | Severity: Minor
Keywords: | Php_version: n/a
Cake_version: |
--+-
1.[[BR]]
code 505 was missing - i added it manually
{{{
$codes = array(
100 = 'Continue',
101 = 'Switching Protocols',
200 = 'OK',
201 = 'Created',
202 = 'Accepted',
203 = 'Non-Authoritative Information',
204 = 'No Content',
205 = 'Reset Content',
206 = 'Partial Content',
300 = 'Multiple Choices',
301 = 'Moved Permanently',
302 = 'Found',
303 = 'See Other',
304 = 'Not Modified',
305 = 'Use Proxy',
307 = 'Temporary Redirect',
400 = 'Bad Request',
401 = 'Unauthorized',
402 = 'Payment Required',
403 = 'Forbidden',
404 = 'Not Found',
405 = 'Method Not Allowed',
406 = 'Not Acceptable',
407 = 'Proxy Authentication Required',
408 = 'Request Time-out',
409 = 'Conflict',
410 = 'Gone',
411 = 'Length Required',
412 = 'Precondition Failed',
413 = 'Request Entity Too Large',
414 = 'Request-URI Too Large',
415 = 'Unsupported Media Type',
416 = 'Requested range not satisfiable',
417 = 'Expectation Failed',
500 = 'Internal Server Error',
501 = 'Not Implemented',
502 = 'Bad Gateway',
503 = 'Service Unavailable',
504 = 'Gateway Time-out',
505 = 'HTTP Version not supported' # MOD
2009-07-21 ms: 505 added!!!
);
}}}
[[BR]]
2. [[BR]]
RFC 2616 states that all unknown HTTP codes must be treated the same as
the base code in their class
{{{
if (!isset($responses[$code])) {
$code = floor($code / 100) * 100;
}
}}}
[[BR]]
3. [[BR]]
it would be nice if the codes are stored separately from the functionality
so we can use them in other places (like components) as well with[[BR]]
$this-responseCodes();[[BR]]
or even[[BR]]
AppController::responseCodes();[[BR]]
etc.[[BR]]
witch would then both return the $codes array
[[BR]]
[[BR]]
right now i have to hardcopy them into my custom component...
[[BR]]
[[BR]]
btw:[[BR]]
this happens in other classes as well[[BR]]
maybe we could do the same there (maybe even transform those method scoped
arrays to object variables - beeing able to use them with $this-codes
etc)
--
Ticket URL: https://trac.cakephp.org/ticket/6522
CakePHP : The Rapid Development Framework for PHP https://trac.cakephp.org/
Cake is a rapid development framework for PHP which uses commonly known design
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC.
Our primary goal is to provide a structured framework that enables PHP users at
all levels to rapidly develop robust web applications, without any loss to
flexibility.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
tickets cakephp group.
To post to this group, send email to tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/tickets-cakephp?hl=en
-~--~~~~--~~--~--~---