title: 'ModSecurity: Error reading request body' when an AJAX request is sent from IE
body: <p>I'm sending an ajax request using jquery as follows:</p>
  
  <pre><code>        $.ajax({
              url: "lastMessageIndex.php",
              type: "POST",
              data: {room: $("#room").val()}
          }).done(function(data){
              lastMessageIndex = data;
          });
  </code></pre>
  
  <p>I've tested this in my development environment and it works, I'm getting the expected response from the server, and the script goes on and the webapp works in general. But when I've uploaded it to my remote server, it doesn't, and in the apache2 error.log file I'm seeing the error:</p>
  
  <p><code>[Sun Oct 28 10:42:46 2012] [error] [client 44.46.23.50] ModSecurity: Error reading request body: Connection reset by peer [hostname "www.mysite.com"] [uri "/ie/IEGetMessages.php"] [unique_id "UI1ujNBx6w4AACW5MkkAAAAF"]</code></p>
  
  <p>This might not be the actual cause of the problem. I wouldn't mind having errors on the log if I'll be getting the response from the ajax I suppose to. It should be a number e.g. '4' and what I'm getting is a long string: "warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/tom/mysite.com/lastMessageIndex.php on line 11"</p>
  
  <hr>
  
  <p>OK, while I was editing this I solved my problem. it's stupid actually, in my dev env, the mySQL database name has a capital letter, on the prod. env it's all lower case.</p>
  
  <p>sorry for the unnecessary mess.</p>