开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜