title: QUnit and PhantomJS testing of AJAX requests only works through proxy
body: <p>I'm attempting to use <code>grunt-contrib-qunit</code> to run a pre-existing suite of qunit tests (testing parsing of ajax request results) in headless mode with Phantom on Windows 8.</p>
  
  <p>The tests complete fine in these scenarios:</p>
  
  <ul>
  <li>When the remote page is accessed directly from any browser <em>without</em> Fiddler or another proxy running</li>
  <li>When Phantom runs the tests from a command prompt <em>with</em> Fiddler open and running</li>
  </ul>
  
  <p>Oddly if I don't have fiddler open monitoring the requests, the AJAX requests I'm testing never seem to initialize. I've checked my default IE LAN Settings and there is no proxy enabled, I've also tried flipping the Auto Detect Settings checkbox there and no change.</p>
  
  <p>Any thoughts??</p>
  
  <p>Details on my setup:</p>
  
  <ul>
  <li>Node v0.10.4</li>
  <li>Latest <code>grunt-contrib-qunit</code></li>
  <li>Windows 8</li>
  <li>QUnit is divided into 4 or 5 modules with setup and teardown tasks in some modules, asynchronous and synchronous tests, and autorun is set to false.</li>
  </ul>
  
  <p><strong>Update:</strong></p>
  
  <p>If I turn off the options in Fiddler for "Reuse client connections" and "Reuse connections to servers" I seem to get the same failure behavior as when Fiddler is off. This led me to believe its a problem with connections being closed prematurely, so I tried setting a custom keep-alive header -- but it still errors out.</p>
  
  <p><strong>Update 2:</strong></p>
  
  <p>I still question this because the page itself loads fine, but the requests fail, but it looks like this could possibly be related to NTLM authentication. Fiddler might somehow facilitating the handshake. There is an <a href="https://github.com/ariya/phantomjs/issues/11037" rel="nofollow">open issue for NTLM on the Phantom github page</a>.</p>
  
  <p><strong>Update 3:</strong></p>
  
  <p>After continued troubleshooting this evening it looks like the issue is only with authentication on POST requests. GET requests seem to work fine. I'm working <em>around</em> this for now by routing all requests through an ASHX handler and thus dropping the auth component. Only thing I had to change was to disable web security on phantom to allow the cross-domain requests through.</p>