Skip to content

Commit

Permalink
remove dev logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Saturn225 authored Oct 19, 2024
1 parent 66dbe0d commit 864d676
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions zio-http/shared/src/main/scala/zio/http/Routes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,12 @@ final case class Routes[-Env, +Err](routes: Chunk[zio.http.Route[Env, Err]]) { s

val chunk = tree.get(req.method, req.path)
def allowedMethods = tree.getAllMethods(req.path)
println(s"[DEBUG] Chunk length for Method ${req.method} and Path ${req.path} = ${chunk.length}")
println(s"[DEBUG] Allowed methods for Path ${req.path} = ${allowedMethods.mkString(", ")}")
req.method match {
case Method.CUSTOM(_) =>
Handler.notImplemented
case _ =>
if (chunk.isEmpty) {
if (allowedMethods.isEmpty || allowedMethods == Set(Method.OPTIONS)) {
if (allowedMethods.isEmpty) {
// If no methods are allowed for the path, return 404 Not Found
Handler.notFound
} else {
Expand Down

0 comments on commit 864d676

Please sign in to comment.