This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
The following commit(s) were added to refs/heads/master by this push:
new dba61ffc9e [FIX] JMAP Session should use temporary redirects (#1636)
dba61ffc9e is described below
commit dba61ffc9ee1e4a69fa9e02f53a7f36c5f9cff4f
Author: Benoit TELLIER <[email protected]>
AuthorDate: Fri Jul 7 12:14:11 2023 +0700
[FIX] JMAP Session should use temporary redirects (#1636)
Permanent redirects causes Safari to drop
Authorization headers
---
.../test/scala/org/apache/james/jmap/routes/SessionRoutesTest.scala | 2 +-
.../jmap/src/main/java/org/apache/james/jmap/JMAPRoutes.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
a/server/protocols/jmap-rfc-8621/src/test/scala/org/apache/james/jmap/routes/SessionRoutesTest.scala
b/server/protocols/jmap-rfc-8621/src/test/scala/org/apache/james/jmap/routes/SessionRoutesTest.scala
index 57650bf80d..699f51dbab 100644
---
a/server/protocols/jmap-rfc-8621/src/test/scala/org/apache/james/jmap/routes/SessionRoutesTest.scala
+++
b/server/protocols/jmap-rfc-8621/src/test/scala/org/apache/james/jmap/routes/SessionRoutesTest.scala
@@ -116,7 +116,7 @@ class SessionRoutesTest extends AnyFlatSpec with
BeforeAndAfter with Matchers {
.redirects().follow(false)
.get
.`then`
- .statusCode(308)
+ .statusCode(302)
.header("Location", "/jmap/session")
}
diff --git
a/server/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPRoutes.java
b/server/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPRoutes.java
index fe7e4a3386..94dea485ac 100644
--- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPRoutes.java
+++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPRoutes.java
@@ -20,8 +20,8 @@
package org.apache.james.jmap;
import static io.netty.handler.codec.http.HttpResponseStatus.BAD_REQUEST;
+import static io.netty.handler.codec.http.HttpResponseStatus.FOUND;
import static
io.netty.handler.codec.http.HttpResponseStatus.INTERNAL_SERVER_ERROR;
-import static
io.netty.handler.codec.http.HttpResponseStatus.PERMANENT_REDIRECT;
import static io.netty.handler.codec.http.HttpResponseStatus.UNAUTHORIZED;
import java.util.stream.Stream;
@@ -45,7 +45,7 @@ public interface JMAPRoutes {
}
static JMAPRoute.Action redirectTo(String location) {
- return (req, res) -> res.status(PERMANENT_REDIRECT).header("Location",
location).send();
+ return (req, res) -> res.status(FOUND).header("Location",
location).send();
}
default Mono<Void> handleInternalError(HttpServerResponse response, Logger
logger, Throwable e) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]