Skip to content

Instantly share code, notes, and snippets.

@terribleplan
Last active August 29, 2015 13:59
Show Gist options
  • Save terribleplan/10478411 to your computer and use it in GitHub Desktop.
Save terribleplan/10478411 to your computer and use it in GitHub Desktop.
XDR workaround
<?
//Check that the request is a POST, sent by ie8/9 and DOESN'T have a content-type with the request
if ($_SERVER['REQUEST_METHOD'] == "POST" && (bool)preg_match('/msie (8|9)./i', $_SERVER['HTTP_USER_AGENT']) && !isset($_SERVER['CONTENT_TYPE'])) {
//And parse it into the $_POST superglobal
parse_str(file_get_contents('php://input'), $_POST);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment