You posing data without setting 'Content-Length' header. XMLHttp will no send any without this header and fail with error invalid data.