@@ -384,6 +384,7 @@ struct Inner<H> {
384384 header_list : Option < List > ,
385385 resolve_list : Option < List > ,
386386 connect_to_list : Option < List > ,
387+ proxy_header_list : Option < List > ,
387388 form : Option < Form > ,
388389 error_buf : RefCell < Vec < u8 > > ,
389390 handler : H ,
@@ -594,6 +595,7 @@ impl<H: Handler> Easy2<H> {
594595 header_list : None ,
595596 resolve_list : None ,
596597 connect_to_list : None ,
598+ proxy_header_list : None ,
597599 form : None ,
598600 error_buf : RefCell :: new ( vec ! [ 0 ; curl_sys:: CURL_ERROR_SIZE ] ) ,
599601 handler,
@@ -1593,15 +1595,17 @@ impl<H> Easy2<H> {
15931595 self . setopt_ptr ( curl_sys:: CURLOPT_HTTPHEADER , ptr as * const _ )
15941596 }
15951597
1596- // /// Add some headers to send to the HTTP proxy.
1597- // ///
1598- // /// This function is essentially the same as `http_headers`.
1599- // ///
1600- // /// By default this option is not set and corresponds to
1601- // /// `CURLOPT_PROXYHEADER`
1602- // pub fn proxy_headers(&mut self, list: &'a List) -> Result<(), Error> {
1603- // self.setopt_ptr(curl_sys::CURLOPT_PROXYHEADER, list.raw as *const _)
1604- // }
1598+ /// Add some headers to send to the HTTP proxy.
1599+ ///
1600+ /// This function is essentially the same as `http_headers`.
1601+ ///
1602+ /// By default this option is not set and corresponds to
1603+ /// `CURLOPT_PROXYHEADER`
1604+ pub fn proxy_headers ( & mut self , list : List ) -> Result < ( ) , Error > {
1605+ let ptr = list:: raw ( & list) ;
1606+ self . inner . proxy_header_list = Some ( list) ;
1607+ self . setopt_ptr ( curl_sys:: CURLOPT_PROXYHEADER , ptr as * const _ )
1608+ }
16051609
16061610 /// Set the contents of the HTTP Cookie header.
16071611 ///
0 commit comments