title: AngularJS $http.post(): returns ERR_EMPTY_RESPONSE
body: <p>I have a form that needs to POST data to a server wich is located in the same network. When posting this data to the server, it returns <code>ERR_EMPTY_RESPONSE</code>.</p>
  
  <p>I also tried posting to the same <code>url</code> using <strong>POSTMAN</strong> and this way seems to be working. </p>
  
  <p>Is the Same Origin policy causing this? Is there any solution to go around that policy?</p>
  
  <p><em><strong>Note:</strong> Can not change anything on the server-side, only client-side</em></p>
  
  <p>Here is the factory that I use to post data:</p>
  
  <pre><code>  app.factory("SendForm", ["$http", "CONFIG", function($http, CONFIG) {
        return {
          sendInfo: function(dynamic, user1, user2, user3, user4, user5, fixed, aux, onSuccess, onError, onFinally) {
            var url = CONFIG.urlSendForm + "?absolute=" + CONFIG.absolute + "&amp;info" + dynamic + "$dyn=" + user1 + "&amp;info2=" + user2 + "&amp;info3=" + user3 + "&amp;info4=" + user4 + "&amp;info5=" + user5 + "&amp;fixed=" + fixed + "&amp;aux=" + aux;
            $http.post(url, {
                headers: {
                  'Content-Type': 'application/x-www-form-urlencoded'
                }
              })
              .success(function(response, data) {
                console.log("success " + response + data + status);
                onSuccess();
              }).error(function(response, data, status, headers, config) {
                onError(response);
  
              });
          }
        }
      }]);
  </code></pre>
  
  <p>and this is what I get logged in the shell after posting:</p>
  
  <blockquote>
    <p><em>OPTIONS <a href="http://192.168.5.2:9000/?absolute=1234&amp;info1" rel="nofollow">http://192.168.5.2:9000/?absolute=1234&amp;info1</a>$dyn=1&amp;info2=1&amp;info3=undefined&amp;info4=undefined&amp;info5=undefined&amp;fixed_info=undefined&amp;aux_info=undefined
    net::ERR_EMPTY_RESPONSE</em></p>
  </blockquote>