title: CURL is not following 301 Redirects, what do I need to do?
body: <p>I am using the CURL c++ api to get quotes from Yahoo's financial API.  The curl api and my code seem to be working fine, however I am getting a "301" redirect message when I tell CURL to visit the url I want.  How can I get CURL to follow through to the 301 redirect and get the data I want?</p>
  
  <p>Here is the URL I am using:</p>
  
  <pre><code>http://download.finance.yahoo.com/d/quotes.csv?e=.csv&amp;s=WSF,WSH&amp;f=b2b3s
  </code></pre>
  
  <p>Here is the response I am getting:</p>
  
  <pre><code>&lt;HEAD&gt;&lt;TITLE&gt;Redirect&lt;/TITLE&gt;&lt;/HEAD&gt;
  &lt;BODY BGCOLOR="white" FGCOLOR="black"&gt;
  &lt;FONT FACE="Helvetica,Arial"&gt;&lt;B&gt;
   "&lt;em&gt;http://download.finance.yahoo.com/d/quotes.csv?e=.csv&amp;s=WSF,WSH,WSM,WSO,WST,WTI,WTM,WTR,WTS,WTU,WTW,WU,WWE,WWW,WX,WXS,WY,WYN,X,XAA,XCJ,XCO,XEC,XEL,XEL-A,XEL-E,XFB,XFD,XFH,XFJ,XFP,XFR,XIN,XJT,XKE,XKK,XKN,XKO,XL,XL-Y,XOM,XRM,XRX,XVF,XVG,Y,YGE,YPF,YSI,YUM,YZC,ZB-A,ZB-B,ZB-C,ZEP,ZF,ZLC,ZMH,ZNH,ZQK,ZTR,ZZ,ZZC&amp;f=b2b3ccd1d2ghjkk2k3l2l3mm2m3m4m5m6m7m8opst7vw&lt;/em&gt;".&lt;p&gt;&lt;/B&gt;&lt;/FONT&gt;
  
  &lt;!-- default "Redirect" response (301) --&gt;
  &lt;/BODY&gt;
  </code></pre>
  
  <p>Here are my CURL init options</p>
  
  <pre><code>CURL *eh = curl_easy_init();
  
  curl_easy_setopt(eh, CURLOPT_WRITEFUNCTION, cb);
  curl_easy_setopt(eh, CURLOPT_HEADER, 0L);
  curl_easy_setopt(eh, CURLOPT_URL, url);
  curl_easy_setopt(eh, CURLOPT_PRIVATE, url);
  curl_easy_setopt(eh, CURLOPT_VERBOSE, 0L);
  
  curl_multi_add_handle(cm, eh);
  </code></pre>
  
  <p>I didn't post my code, as it is all working, I just need the general method of following through woth the 301's with CURL.</p>