Skip to content

Commit

Permalink
Merge branch 'paulyoung/reqwest-body'
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Oct 27, 2022
2 parents 8f64ecd + 9065a88 commit c9c1658
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions git-transport/src/client/blocking_io/http/reqwest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ mod remote {
req_builder = req_builder.body(reqwest::blocking::Body::new(post_body_rx));
}
let mut req = req_builder.build()?;
if let Some(mutex) = config.configure_request {
let mut configure_request = mutex.lock().expect("our thread cannot ordinarily panic");
configure_request(&mut req)?;
}
let (mut response_body_tx, response_body_rx) = pipe::unidirectional(0);
let (mut headers_tx, headers_rx) = pipe::unidirectional(0);
if res_send
Expand All @@ -68,6 +64,10 @@ mod remote {
// Shut down as something is off.
break;
}
if let Some(mutex) = config.configure_request {
let mut configure_request = mutex.lock().expect("our thread cannot ordinarily panic");
configure_request(&mut req)?;
}
let mut res = match client.execute(req).and_then(|res| res.error_for_status()) {
Ok(res) => res,
Err(err) => {
Expand Down

0 comments on commit c9c1658

Please sign in to comment.