fn finalize_headers(&mut self) {
        if self.is_about_to_redirect() {
            debug!("preparing for redirect to {:?}", self.headers.get("Location"));

            // It appears that curl will do a redirect, so instead of completing the future, just reset the response
            // state.
            self.status_code = None;
            self.version = None;
            self.headers.clear();

            return;
        }

        self.ensure_future_is_completed();
    }
/// Completes the associated future when headers have been received.
Completes the associated future when headers have been received.
Completes the associated future when headers have been received .
fn finalize_headers(&mut self) {
        if self.is_about_to_redirect() {
            debug!("preparing for redirect to {:?}", self.headers.get("Location"));
            // It appears that curl will do a redirect, so instead of completing the future, just reset the response
            // state.
            self.status_code = None;
            self.version = None;
            self.headers.clear();
            return;
        }
        self.ensure_future_is_completed();
    }
fn finalize_headers ( & mut self ) { if self . is_about_to_redirect ( ) { debug ! ( " " self headers get ( " " ) ) ; // It appears that curl will do a redirect, so instead of completing the future, just reset the response // state. self . status_code = None ; self . version = None ; self . headers . clear ( ) ; return ; } self . ensure_future_is_completed ( ) ; }
Completes the associated future when headers have been received.
Completes the associated future when headers have been received .
&mut self
&mut self