AS3: Basic Auth returns HTTP Status #0 (?)

Im working on a Flash script to connect to twitter via a PHP proxy I’ve written. When I go to the proxy in a browser, the browser spawns the standard username/password dialogue and then the proxy works just fine.

However, when I send the user name and password from an SWF after it has been base64 encoded, and set as a header user URLRequestHeader(“HTTP_AUTHENTICATION”, "BASIC " + [encoded credentials]);

I get a HTTP Status code of 0. Which is not a real code. I also have a cross-domain file on the server set to accept all headers.

Does anyone have experience with Basic Auth from Flash that could give me some pointers?