We've been having some trouble with getting XML from our server. It returns 200 STATUS OK but, like the title notes, it's not returning the XML that we pointed it to but instead is giving back a complete EE Snippet! It's really weird.
The XML is well-formed (validation passed with no errors) and the '
var url = "OUR URL"' is well-formed (but can't share with you for obvious reasons).
Do you have any ideas as to why this would happen and what EE might be doing to make it happen?
EDIT 1: A quick note. When we add '
http://www.' to the beginning of our domain it returns a
404 STATUS. But when we remove it (leaving just our domain '
example.com') it returns a
200 STATUS. I'm not sure why this is.
Additionally, we are conforming to the Same Origin Policy (http://en.wikipedia.org/wiki/Same_origin_policy)
EDIT 2: The Snippet being returned contains the:
<!DOCTYPE html"> <html lang="en"> <head> ... </head> <body>
and we're calling the
XMLHttpRequest() within the
<script>...</script> within the body (contained in it's own template). Moving the
XMLHttpRequest() into the
<head> doesn't fix the issue.