I've got a strange case.
On my VirtualMachine, with Ubuntu Server, I've this code that works fine:
header("HTTP/1.0 200 USER-007");
In my JavaScript I get rightly
status: 200
statusText: USER-007
But if I upload the entire website on the server online, I get always
status: 200
statusText: OK