update change log
This commit is contained in:
parent
75d7221d06
commit
75787a1483
2 changed files with 9 additions and 1 deletions
|
|
@ -20,6 +20,7 @@
|
||||||
- fixed incorrect diff when document is root, and html element is omitted
|
- fixed incorrect diff when document is root, and html element is omitted
|
||||||
- fixed querystring clobbering in links w/ config:m.route [#261](https://github.com/lhorie/mithril.js/issues/261)
|
- fixed querystring clobbering in links w/ config:m.route [#261](https://github.com/lhorie/mithril.js/issues/261)
|
||||||
- fixed rare bug that made events get dropped [#214](https://github.com/lhorie/mithril.js/issues/214)
|
- fixed rare bug that made events get dropped [#214](https://github.com/lhorie/mithril.js/issues/214)
|
||||||
|
- don't send Content-Type header if there's no request data [#280](https://github.com/lhorie/mithril.js/issues/280)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1553,11 +1553,18 @@ function testMithril(mock) {
|
||||||
})
|
})
|
||||||
test(function() {
|
test(function() {
|
||||||
var error = m.prop("no error")
|
var error = m.prop("no error")
|
||||||
var prop = m.request({method: "POST", url: "test"}).then(null, error)
|
var prop = m.request({method: "POST", url: "test", data: {foo: 1}}).then(null, error)
|
||||||
var xhr = mock.XMLHttpRequest.$instances.pop()
|
var xhr = mock.XMLHttpRequest.$instances.pop()
|
||||||
xhr.onreadystatechange()
|
xhr.onreadystatechange()
|
||||||
return xhr.$headers["Content-Type"] == "application/json; charset=utf-8"
|
return xhr.$headers["Content-Type"] == "application/json; charset=utf-8"
|
||||||
})
|
})
|
||||||
|
test(function() {
|
||||||
|
var error = m.prop("no error")
|
||||||
|
var prop = m.request({method: "POST", url: "test"}).then(null, error)
|
||||||
|
var xhr = mock.XMLHttpRequest.$instances.pop()
|
||||||
|
xhr.onreadystatechange()
|
||||||
|
return xhr.$headers["Content-Type"] === undefined
|
||||||
|
})
|
||||||
|
|
||||||
// m.request over jsonp
|
// m.request over jsonp
|
||||||
test(function(){
|
test(function(){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue