This is an automated email from the ASF dual-hosted git repository.
pjfanning pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-http.git
The following commit(s) were added to refs/heads/main by this push:
new 0216cedae more issues with unmoored docs (#1116)
0216cedae is described below
commit 0216cedae561000ccdf83e7e58d6fc59c6df5c20
Author: PJ Fanning <[email protected]>
AuthorDate: Wed Jul 1 12:35:02 2026 +0100
more issues with unmoored docs (#1116)
---
.../org/apache/pekko/http/cors/scaladsl/CorsDirectives.scala | 6 +++---
.../pekko/http/scaladsl/server/directives/PathDirectives.scala | 10 +++-------
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git
a/http-cors/src/main/scala/org/apache/pekko/http/cors/scaladsl/CorsDirectives.scala
b/http-cors/src/main/scala/org/apache/pekko/http/cors/scaladsl/CorsDirectives.scala
index a628b54ab..c1c6c6f96 100644
---
a/http-cors/src/main/scala/org/apache/pekko/http/cors/scaladsl/CorsDirectives.scala
+++
b/http-cors/src/main/scala/org/apache/pekko/http/cors/scaladsl/CorsDirectives.scala
@@ -67,7 +67,7 @@ trait CorsDirectives {
def cors(settings: CorsSettings): Directive0 = {
import settings._
- /** Return the invalid origins, or `Nil` if one is valid. */
+ // Return the invalid origins, or `Nil` if one is valid.
def validateOrigins(origins: Seq[HttpOrigin]): List[CorsRejection.Cause] =
if (allowedOrigins == HttpOriginMatcher.* ||
origins.exists(allowedOrigins.matches)) {
Nil
@@ -75,7 +75,7 @@ trait CorsDirectives {
CorsRejection.InvalidOrigin(origins) :: Nil
}
- /** Return the method if invalid, `Nil` otherwise. */
+ // Return the method if invalid, `Nil` otherwise.
def validateMethod(method: HttpMethod): List[CorsRejection.Cause] =
if (allowedMethods.contains(method)) {
Nil
@@ -83,7 +83,7 @@ trait CorsDirectives {
CorsRejection.InvalidMethod(method) :: Nil
}
- /** Return the list of invalid headers, or `Nil` if they are all valid. */
+ // Return the list of invalid headers, or `Nil` if they are all valid.
def validateHeaders(headers: Seq[String]): List[CorsRejection.Cause] = {
val invalidHeaders = headers.filterNot(allowedHeaders.matches)
if (invalidHeaders.isEmpty) {
diff --git
a/http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/PathDirectives.scala
b/http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/PathDirectives.scala
index 54a84477e..4bfb0fd98 100644
---
a/http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/PathDirectives.scala
+++
b/http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/PathDirectives.scala
@@ -220,18 +220,14 @@ trait PathDirectives extends PathMatchers with
ImplicitPathMatcherConstruction w
*/
def ignoreTrailingSlash: Directive0 = Directive[Unit] {
- /**
- * Converts a URL that ends with `/` to one without. Or one that ends
without `/` to one with it.
- */
+ // Converts a URL that ends with `/` to one without. Or one that ends
without `/` to one with it.
def flipTrailingSlash(path: Path): Path = {
if (path.endsWithSlash && path != Path.SingleSlash)
path.reverse.tail.reverse
else path ++ Path.SingleSlash
}
- /**
- * Transforms empty rejections to
[[pekko.http.scaladsl.server.directives.PathDirectives.TrailingRetryRejection]]
- * for the only purpose to break the loop of rejection handling
- */
+ // Transforms empty rejections to
[[pekko.http.scaladsl.server.directives.PathDirectives.TrailingRetryRejection]]
+ // for the only purpose to break the loop of rejection handling
val transformEmptyRejections = recoverRejections(rejections =>
if (rejections == Nil) {
Rejected(List(TrailingRetryRejection))
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]