title: AJAX Post Request over VPN stripping request data
body: <p>I've got a web application that is hosted behind a company intranet. For any users that need remote access the current solution is for them to connect via VPN, and then use the internal site location.</p>
  
  <p>The application PHP based, with a front-end built on AJAX requests that get information and pages from the PHP backend.</p>
  
  <p>Within the internal network there are <strong>zero</strong> problems making requests, however with a connection through the VPN almost 80% of all AJAX requests fail. </p>
  
  <p><strong>So here's whats happening,</strong> the browser is making a correct call, and attaching all of the post data. The server is receiving the request, without the data, and then sending back a failure as it is required. I've tried just echoing the $_POST array and it is empty whenever it fails.</p>
  
  <p>Any ideas as to what could be causing the stripping of just the post data enroute? The VPN provider is Microsoft TMG, and the site is hosted on IIS 8.5.</p>
  
  <p><strong>Edit:</strong> Here's some example code to give a better idea of what I'm seeing.</p>
  
  <p><strong>JS:</strong></p>
  
  <pre><code>var submit = 'test';
  
  $.ajax({
          type:'POST',
          data: submit,
          url:base_url+'ajax_get_data/',
          dataType: 'json',
          timeout: 8000,
          success: function(data) {   
  
              // Do soemthing
          },
          error: function(e){
  
              // Error
          }
      });
  </code></pre>
  
  <p><strong>PHP:</strong></p>
  
  <pre><code>public function ajax_get_data(){
  
      var_dump($_POST);
      return;
  }
  </code></pre>
  
  <p>In this example, looking at the return data raw from the server, here's what the inspector shows:</p>
  
  <pre><code>array(0){
  
  }
  </code></pre>
  
  <p>The server is not actually receiving the attached request data, but the client browser is reporting that it sent the correct request data.</p>