This is a part of bug 13075 that is a regression from shipping WebKit (and coincidentally is easy to fix). NETWORK_ERR should only be raised for network errors, and 4xx HTTP codes aren't such. This matches other browsers, and the draft spec. Patch forthcoming.
Created attachment 15613 [details] proposed fix
Forgot to mention: this problem didn't occur on Windows.
<rdar://problem/5352526>
Comment on attachment 15613 [details] proposed fix This was reviewed and landed by Anders in r24779 (with some changes in test for Apache 2 compatibility).