title: jQuery, Ajax, WP, posting 4000B long text: 404 not found (2000B=OK)?
body: <p>It's my first post/thread here, I haven't been active in forums for some time cause frankly I didn't need it, but this one just got me.
  I tried everything in my knowledge -and I mean everything, I'm a fanatic trial-and-error tester.</p>
  
  <p>Situation:
  jQuery, posts some data through Ajax collected primarily from a $('#textarea') to a php file on server.
  If the data is >X Bytes, I get 404 Not Found and the 404 Html page in Ajax error handler.
  Otherwise, everything runs smoothly and I get my results.</p>
  
  <p>I must specify that I post to a php file that loads Wordpress's wp-blog-header.php before doing calculations, as the code is intended to be part of a WPplugin.</p>
  
  <ul>
  <li>I tried to return header("HTTP/1.1 200 OK") as some suggested, considering WP was altering the header for not finding the file as part of the system, and it solved the issue locally for some cases, but not remotly.</li>
  <li>I tried to set the Content-Length in ajax call.</li>
  <li>I switched between the WP type of handling Ajax calls, and having my own .php file, in the folder of my plugin.</li>
  <li>I alternated calling wp-load.php, wp-config.php, and wp-blog-header.php in the beginning of my ajax file, and still nothing (solved some issues locally, but not remotely)
  Nothing worked. The only thing that works is trimming the content sent to the .php file. 2000-2500B work ok, 3000+B give me 404 not found.</li>
  </ul>
  
  <p>What could this be? post_data_size is 8M on server. 
  Could this be maybe related to SSL as I've seen in some cases? Is this server-side?
  Please help,</p>
  
  <p>P.S. My Javascript:</p>
  
  <pre><code>var data1 = {
      action: 'get-tables',
      html: $('#content').val(),
      nonce: kwd_settings.nonce
  };
  $.ajax({
      url: kwd_settings.ajax_url,
      type: 'POST',
      data: data1,
      scriptCharset: 'utf-8',
      timeout: 10000, /*10 seconds*/
      beforeSend: function( xhr ) {
          xhr.setRequestHeader("Content-length", $('#content').val().length+500);
          showProgress(true);
      },
      error: function (request, ajaxOptions, thrownError) {
          alert(request.statusText);
          alert(request.responseText);
          showProgress(false);
      },
      success: function( response ) {
          var r= response;
          showResponse(r);
      }
  });
  </code></pre>