Skip to content

Commit

Permalink
revert: do not change sign_query logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jdockerty committed Aug 13, 2024
1 parent 2a98679 commit f1a78d7
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions core/src/services/gcs/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ use std::time::Duration;
use backon::ExponentialBuilder;
use backon::Retryable;
use bytes::Bytes;
use http::header;
use http::header::CONTENT_LENGTH;
use http::header::CONTENT_TYPE;
use http::header::HOST;
Expand Down Expand Up @@ -143,15 +142,6 @@ impl GcsCore {
}

pub async fn sign_query<T>(&self, req: &mut Request<T>, duration: Duration) -> Result<()> {
if let Some(token) = &self.token {
req.headers_mut().remove(HOST);

let header_value = format!("Bearer {}", token);
req.headers_mut()
.insert(header::AUTHORIZATION, header_value.parse().unwrap());
return Ok(());
}

if let Some(cred) = self.load_credential()? {
self.signer
.sign_query(req, duration, &cred)
Expand Down

0 comments on commit f1a78d7

Please sign in to comment.