akka/akka-http

Impossible to parse cyrillic Uri

開放

#86 建立於 2016年9月8日

 (14 則留言) (3 個反應) (0 位負責人)Scala (598 個分叉)batch import
1 - triagedhelp wantedt:coret:model

倉庫指標

星標
 (1,311 顆星)
PR 合併指標
 (平均合併 1天 10小時) (30 天內合併 2 個 PR)

描述

Issue by RomanIakovlev Tuesday Feb 02, 2016 at 19:17 GMT Originally opened as https://github.com/akka/akka/issues/19677


Consider this:

"com.typesafe.akka" %% "akka-http-experimental" % "2.4.2-RC1"

import akka.http.scaladsl.model.Uri

scala> Uri("http://президент.рф/", Uri.ParsingMode.Relaxed)
akka.http.scaladsl.model.IllegalUriException: Illegal URI reference: Invalid input 'п', expected 'EOI', '#', '?', path-abempty or authority (line 1, column 8): http://президент.рф/
       ^
  at akka.http.scaladsl.model.IllegalUriException$.apply(ErrorInfo.scala:40)
  at akka.http.scaladsl.model.Uri$.fail(Uri.scala:741)
  at akka.http.impl.model.parser.UriParser.fail(UriParser.scala:62)
  at akka.http.impl.model.parser.UriParser.parseUriReference(UriParser.scala:33)
  at akka.http.scaladsl.model.Uri$.apply(Uri.scala:209)
  at akka.http.scaladsl.model.Uri$.apply(Uri.scala:199)
  ... 43 elided

Any insights on how to tackle this?

貢獻者指南