diff --git a/akka-http-core/src/test/scala/akka/http/scaladsl/model/UriSpec.scala b/akka-http-core/src/test/scala/akka/http/scaladsl/model/UriSpec.scala index 4c9e1d6e50..189e203a87 100644 --- a/akka-http-core/src/test/scala/akka/http/scaladsl/model/UriSpec.scala +++ b/akka-http-core/src/test/scala/akka/http/scaladsl/model/UriSpec.scala @@ -609,5 +609,11 @@ class UriSpec extends WordSpec with Matchers { Uri("http://example.com/foo/bar?query=1#frag").toHttpRequestTargetOriginForm.toString === "/foo/bar?query=1" Uri("http://example.com//foo/bar?query=1#frag").toHttpRequestTargetOriginForm.toString === "//foo/bar?query=1" } + + "survive parsing a URI with thousands of path segments" in { + val slashes = "/a/" * 2000 + val uri = Uri(s"http://foo.bar/$slashes") + uri.toString // was reported to throw StackOverflowException in Spray's URI + } } }