提交 521d05d5 编写于 作者: K Kohsuke Kawaguchi

Cherry-picking c6acb5b8

上级 794cc766
......@@ -1507,6 +1507,14 @@ Ajax.Base = Class.create({
if (Object.isHash(this.options.parameters))
this.options.parameters = this.options.parameters.toObject();
// KK patch -- handle crumb for POST automatically by adding a header
if(this.options.method=="post") {
if(this.options.requestHeaders==undefined)
this.options.requestHeaders = {};
crumb.wrap(this.options.requestHeaders);
}
// KK patch until here
}
});
Ajax.Request = Class.create(Ajax.Base, {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册