akkaplayframework-2.6

Request-URI Too Long': URI length exceeds the configured limit of 2048 characters


I had this configuration , i use play 2.6 and i cant use Netty and POST

 play.server.akka{
    http.server.parsing.max-uri-length = 16k
    http.client.parsing.max-uri-length = 16k      
    http.host-connection-pool.client.parsing.max-uri-length = 16k      
    http.max-uri-length = 16k
    max-uri-length = 16k
}

akka.http {
  parsing {
    max-uri-length = 16k
  }
}

But throw this exception akka.actor.ActorSystemImpl(play-dev-mode)] Illegal request, responding with status '414 Request-URI Too Long': URI length exceeds the configured limit of 2048 characters


Solution

  • Since you're running in dev mode, add the akka.http.parsing.max-uri-length=16k configuration setting to the command line:

    -Dakka.http.parsing.max-uri-length=16k