title: cURL follow redirect without headers from original request
body: <p>I'm trying to download the bits of a Cloud Foundry app using the Cloud Foundry API.</p>
  
  <p><a href="https://apidocs.cloudfoundry.org/236/apps/downloads_the_bits_for_an_app.html" rel="nofollow">https://apidocs.cloudfoundry.org/236/apps/downloads_the_bits_for_an_app.html</a></p>
  
  <blockquote>
    <p>When using a remote blobstore, such as AWS, the response is a redirect to the actual location of the bits. If the client is automatically following redirects, then the OAuth token that was used to communicate with Cloud Controller will be replayed on the new redirect request. Some blobstores may reject the request in that case. <strong>Clients may need to follow the redirect without including the OAuth token</strong>.</p>
  </blockquote>
  
  <p>Here is my cURL command I'm attempting to use:</p>
  
  <pre><code>$ curl -L "https://api.my.host.net/v2/apps/my_app_guid/download" -X GET -H "Authorization: bearer myauthtoken"
  curl: (7) Failed to connect to dal05.objectstorage.service.networklayer.com port 443: Operation timed out
  </code></pre>
  
  <p>I'm assuming my issue is that my Auth header bearer token is being sent on the redirect based on the quote from the Cloud Foundry API docs. How can I follow the redirect without the OAuth token? I'm using the default cURL command line utility on Mac OS X 10.11.</p>