开发者

Kohana 3.2 request->headers['Content-Type'] keeps failing

开发者 https://www.devze.com 2023-03-26 04:22 出处:网络
This won\'t work in Kohana 3开发者_Python百科.2 for some reason: $this->request->headers[\'Content-Type\'] = \'text/xml\';

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消