Ser*_*hiy 3 php content-type header kohana kohana-3
由于某些原因,这在Kohana 3.2中不起作用:
$this->request->headers['Content-Type'] = 'text/xml';
Run Code Online (Sandbox Code Playgroud)
自Kohana 3.1以来有没有改变?
它也不应该在3.1中工作,但这应该:
$this->request->headers('Content-Type', 'text/xml');
Run Code Online (Sandbox Code Playgroud)
请参阅http://kohanaframework.org/3.2/guide/api/Request#headers 这是3.1中的请求/响应重构更改之一.