AJAX file upload: setting X-HTTP-Accept and HTTP_ORIGIN to give the
server enough information to decide what to do with the request.