Changeset 994

Show
Ignore:
Timestamp:
10/29/05 18:45:33 (4 years ago)
Author:
mbonetti
Message:

headers must be escaped as well (because of the Host: request header)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/rss/extlib/Snoopy.class.inc

    r990 r994  
    751751            $headers[] = "Authorization: BASIC ".base64_encode($this->user.":".$this->pass); 
    752752             
    753         for($curr_header = 0; $curr_header < count($headers); $curr_header++) 
     753        for($curr_header = 0; $curr_header < count($headers); $curr_header++) { 
    754754            $cmdline_params .= " -H \"".$headers[$curr_header]."\""; 
     755        } 
    755756         
    756757        if(!empty($body)) 
     
    765766        // mbi: removed, as it breaks on older cURL's 
    766767        //$cmdline_params .= " -k"; 
    767         $full_cmdline = $this->curl_path." -D \"".$this -> tmpdir."$headerfile\"".$cmdline_params." ".escapeshellcmd($URI); 
    768          
     768        $full_cmdline = $this->curl_path 
     769            ." -D \"".$this -> tmpdir 
     770            ."$headerfile\"" 
     771            .escapeshellcmd($cmdline_params)." " 
     772            .escapeshellcmd($URI); 
     773//      die($full_cmdline); 
    769774        exec($full_cmdline,$results,$return); 
    770775