Skip to content
  1. May 28, 2012
  2. May 27, 2012
  3. May 26, 2012
  4. May 25, 2012
    • Yang Tse's avatar
    • Tatsuhiro Tsujikawa's avatar
      Made -D option work with -O and -J. · b061fed9
      Tatsuhiro Tsujikawa authored
      To achieve this, first new structure HeaderData is defined to hold
      necessary data to perform header-related work.  Then tool_header_cb now
      receives HeaderData pointer as userdata.  All header-related work
      (currently, dumping header and Content-Disposition inspection) are done
      in this callback function.  HeaderData.outs->config is used to determine
      whether each work is done.
      
      Unit tests were also updated because after this change, curl code always
      sets CURLOPT_HEADERFUNCTION and CURLOPT_HEADERDATA.
      
      Tested with -O -J -D, -O -J -i and -O -J -D -i and all worked fine.
      b061fed9