When creating a REST-API for a client we ran across this really weird problem.
IE8/IE9 can’t make XMLHttpRequest to other domains via CORS. Microsoft invented their own solution for this problem, called XDR. The problem with XDR is that it doesn’t send a Content-type when doing POST requests, defaulting this value to “text/plain” instead.
PHP populates the $_POST array with data, only when the Content-type is set to “application/x-www-form-urlencoded” or “multipart/form-data”. So $_POST is just an empty array, unless you make some kind of workaround.
Here’s a stripped down version on how we solved it.
Comments
One response to “Working around the IE9/IE8 XDR Post bug”
[…] Solution http://labs.earthpeople.se/2013/10/working-around-the-ie-xdr-post-bug/ […]