akka / akka/akka-http

Impossible to parse cyrillic Uri

Open
#86 14 comments 3 reactions 0 assignees View on GitHub
1 - triaged help wanted t:core t:model
Dominant language
Scala
Stars
1.4k
Forks
584
Avg merge
14h 33m
Merged PRs (30d)
24

Description

**Issue by [RomanIakovlev](https://github.com/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?

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure through akka.http.scaladsl.model.Uri.apply with Uri.ParsingMode.Relaxed, then read akka.http.impl.model.parser.UriParser.scala and akka.http.scaladsl.model.Uri.scala around the reported stack frames. Done means the shown Cyrillic URI parses successfully without regressing existing URI parsing behavior; the issue does not name a test file.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.