{"action":"created","issue":{"url":"https://api.github.com/repos/evantahler/actionhero/issues/579","labels_url":"https://api.github.com/repos/evantahler/actionhero/issues/579/labels{/name}","comments_url":"https://api.github.com/repos/evantahler/actionhero/issues/579/comments","events_url":"https://api.github.com/repos/evantahler/actionhero/issues/579/events","html_url":"https://github.com/evantahler/actionhero/issues/579","id":57014752,"number":579,"title":" 'content-type' field is undefined when use XDomainRequest","user":{"login":"enginespot","id":1422439,"avatar_url":"https://avatars.githubusercontent.com/u/1422439?v=3","gravatar_id":"","url":"https://api.github.com/users/enginespot","html_url":"https://github.com/enginespot","followers_url":"https://api.github.com/users/enginespot/followers","following_url":"https://api.github.com/users/enginespot/following{/other_user}","gists_url":"https://api.github.com/users/enginespot/gists{/gist_id}","starred_url":"https://api.github.com/users/enginespot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enginespot/subscriptions","organizations_url":"https://api.github.com/users/enginespot/orgs","repos_url":"https://api.github.com/users/enginespot/repos","events_url":"https://api.github.com/users/enginespot/events{/privacy}","received_events_url":"https://api.github.com/users/enginespot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-09T10:47:41Z","updated_at":"2015-02-09T12:30:25Z","closed_at":null,"body":"for IE 8 9 10 ,  for a CROS post request ,  we can only use  XDomainRequest\r\n\r\nbut when use it , the request header 'content-type' will be undefined and also we can not use middleware fix it .\r\n"},"comment":{"url":"https://api.github.com/repos/evantahler/actionhero/issues/comments/73500933","html_url":"https://github.com/evantahler/actionhero/issues/579#issuecomment-73500933","issue_url":"https://api.github.com/repos/evantahler/actionhero/issues/579","id":73500933,"user":{"login":"enginespot","id":1422439,"avatar_url":"https://avatars.githubusercontent.com/u/1422439?v=3","gravatar_id":"","url":"https://api.github.com/users/enginespot","html_url":"https://github.com/enginespot","followers_url":"https://api.github.com/users/enginespot/followers","following_url":"https://api.github.com/users/enginespot/following{/other_user}","gists_url":"https://api.github.com/users/enginespot/gists{/gist_id}","starred_url":"https://api.github.com/users/enginespot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enginespot/subscriptions","organizations_url":"https://api.github.com/users/enginespot/orgs","repos_url":"https://api.github.com/users/enginespot/repos","events_url":"https://api.github.com/users/enginespot/events{/privacy}","received_events_url":"https://api.github.com/users/enginespot/received_events","type":"User","site_admin":false},"created_at":"2015-02-09T12:30:25Z","updated_at":"2015-02-09T12:30:25Z","body":"'''\r\nvar HeaderFix;\r\nHeaderFix = (function() {\r\n  function HeaderFix(api) {\r\n    var EmptyFunc, orignalEvent;\r\n    this.api = api;\r\n    EmptyFunc = function(connection, actionTemplate, next) {\r\n      next(connection, true);\r\n    };\r\n    api.actions.addPreProcessor(EmptyFunc);\r\n    orignalEvent = api.servers.servers.web._events['connection'];\r\n    api.servers.servers.web._events['connection'] = function(connection) {\r\n      if (connection.rawConnection.req.headers[\"content-type\"] === void 0) {\r\n        connection.rawConnection.req.headers[\"content-type\"] = \"application/x-www-form-urlencoded\";\r\n      }\r\n      orignalEvent(connection);\r\n    };\r\n  }\r\n  return HeaderFix;\r\n})();\r\n\r\n\r\nexports.headerFix = function(api, next) {\r\n  api.headerFix = new HeaderFix(api);\r\n  next();\r\n};\r\n'''\r\ncurrently we add the above code fix the bug , hope that in future we can find a good solution.\r\n\r\nThanks.\r\n"}}