title: Why Im get 400 bad request?
body: <p>I'm using Codeigniter Framework and I want to do something like this:</p>
  
  <p>I want send <code>$_GET</code> varibale from server 1 to server 2, like this: <code>www.server1.com?foo=123</code></p>
  
  <p>AND now on server 2, check if the <code>$_GET==123</code> return some data.</p>
  
  <p>My code look like this that:</p>
  
  <p>on server 1, example: <code>www.server1.com?foo=hello</code></p>
  
  <pre><code>if(isset($_GET['foo'])){
          $post_fields = array(
              'foo' =&gt; $_GET['foo']
          );
          $ch = curl_init('http://server2.com/master.php');
          curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
          curl_setopt($ch, CURLOPT_POSTFIELDS,  $post_fields);
          curl_setopt($ch, CURLOPT_POST, 1);
          $result = curl_exec($ch);
          die($result);
      }
  </code></pre>
  
  <p>and the code on server 2 look like this:</p>
  
  <pre><code>$variable = $_POST['foo'];
  if($variable=="hellow"){
      echo "right!";
  }else{
      echo "wrong";
  }
  </code></pre>
  
  <p>When I run this code I'm getting 400 bad request - nginx:</p>