summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorMauro D <mauro@stalw.art>2024-01-21 08:03:21 -0300
committerMauro D <mauro@stalw.art>2024-01-21 08:03:21 -0300
commit9f257610141f4a14d6f33ab45fa418f71ca1a83e (patch)
tree4341ddaa3bc739e9169ea9cd4ba71e73f628657d /crates
parentd7d27063d8c2bf3f72dd0df418186538121bc480 (diff)
OAuth: redirect using a 301 instead of a 307 code
Diffstat (limited to 'crates')
-rw-r--r--crates/jmap/src/auth/oauth/user_code.rs2
-rw-r--r--crates/smtp/src/core/eval.rs20
2 files changed, 3 insertions, 19 deletions
diff --git a/crates/jmap/src/auth/oauth/user_code.rs b/crates/jmap/src/auth/oauth/user_code.rs
index 9403ecc6..d18912e2 100644
--- a/crates/jmap/src/auth/oauth/user_code.rs
+++ b/crates/jmap/src/auth/oauth/user_code.rs
@@ -219,7 +219,7 @@ impl JMAP {
HtmlResponse::new(response).into_http_response()
} else {
hyper::Response::builder()
- .status(StatusCode::TEMPORARY_REDIRECT)
+ .status(StatusCode::MOVED_PERMANENTLY)
.header(header::LOCATION, redirect_link)
.body(
Full::new(Bytes::from(Vec::<u8>::new()))
diff --git a/crates/smtp/src/core/eval.rs b/crates/smtp/src/core/eval.rs
index d7f4756e..2403ec37 100644
--- a/crates/smtp/src/core/eval.rs
+++ b/crates/smtp/src/core/eval.rs
@@ -75,15 +75,7 @@ impl SMTP {
match result.try_into() {
Ok(value) => Some(value),
- Err(_) => {
- tracing::warn!(
- context = "eval_if",
- event = "error",
- property = if_block.key,
- "Failed to convert value."
- );
- None
- }
+ Err(_) => None,
}
}
@@ -112,15 +104,7 @@ impl SMTP {
match result.try_into() {
Ok(value) => Some(value),
- Err(_) => {
- tracing::warn!(
- context = "eval_expr",
- event = "error",
- property = expr_id,
- "Failed to convert value."
- );
- None
- }
+ Err(_) => None,
}
}