Kohana 3.2 request->headers['Content-Type'] keeps failing
This won't work in Kohana 3开发者_Python百科.2 for some reason:
$this->request->headers['Content-Type'] = 'text/xml';
Has this changed since Kohana 3.1?
It should not work in 3.1 either, but this should:
$this->request->headers('Content-Type', 'text/xml');
See http://kohanaframework.org/3.2/guide/api/Request#headers This was one of the Request/Response refactoring changes from 3.1.
精彩评论