title: Proxy Error 502 Openshift
body: <p>I'am using Openshift Demo in my local machine and Drupal project, when i submit in a form.php i need to create an app with the REST API with the curl lib, and i get the :</p>
  
  <pre><code>Proxy Error 502
  The proxy server received an invalid response from an upstream server.
  The proxy server could not handle the request POST /.
  Reason: Error reading from remote server
  </code></pre>
  
  <p>I don't have any suspect things in all my logs files, also i change all params (TimeOut, size ..) in the haproxy config, httpd.conf, broker.conf and i still have the error so any ideas why this error ?</p>
  
  <p>This my curl code :</p>
  
  <pre><code>$ch = curl_init();
      curl_setopt($ch, CURLOPT_URL,$url);
      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($ch, CURLOPT_PROXY, null);
      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
      curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
      curl_setopt($ch, CURLOPT_USERPWD, $username . ':' . $password);
      curl_setopt($ch, CURLOPT_POSTFIELDS, 'name=test&amp;cartridge[url]=my_Cartridge_URL');
      curl_setopt($ch, CURLOPT_POST, true);
      $server_output_app_create = curl_exec ($ch);
      drupal_set_message(''. print_r($server_output_app_create, TRUE) .'');
      curl_close ($ch);
  </code></pre>
  
  <p>Thanks</p>