Ah, I thought akka/akka#18479 <https://github.com/akka/akka/issues/18479>was saying that "GROUP=10380?page=2" is a valid case for the relaxed mode as RomanIakovlev said this.
> I still think it's a workaround rather than proper solution though. Question marks and equal signs are not prohibited inside the query. Just sayin'. If that is still not allowed, and if you need your own parsing implementation to allow that, then clarification in the documentation helps us more, which akka/akka-http#276 <https://github.com/akka/akka-http/issues/276> is asking for. (will try to work on #276 if no one is picking it up yet) Thanks 2016年10月10日月曜日 17時23分00秒 UTC+9 André: > > Hi Richard, > > "GROUP=10380?page=2" isn't a well formed query and therefore can't be > parsed even in relaxed mode. akka/akka#18479 > <https://github.com/akka/akka/pull/18715> provides a way to prevent > parsing of the query component and to just look at the raw query string. > You can access your query via the queryString() method and parse it youself. > > HTH > André > > On Sunday, October 9, 2016 at 6:38:34 PM UTC+2, Richard Imaoka wrote: >> >> Hi, >> >> While I tried to work on akka/akka-http#276 >> <https://github.com/akka/akka-http/issues/276>, and looked at >> akka/akka#18479 <https://github.com/akka/akka/pull/18715> (PR to fix >> #18479 = akka/akka#18715 <https://github.com/akka/akka/pull/18715>), >> I found that the following code: >> >> Query("GROUP=10380?page=2",mode = Uri.ParsingMode.Relaxed) >> >> >> throws an exception: >> >> IllegalUriException: Illegal query: Invalid input '=', expected '+', >> query-char, 'EOI', '&' or pct-encoded (line 1, column 17): GROUP=10380?page= >> >> >> Wasn't akka/akka#18479 <https://github.com/akka/akka/pull/18715> (PR= >> akka/akka#18715 <https://github.com/akka/akka/pull/18715>) intended to >> make this a valid query string, with Uri.ParsingMode.Relaxed ? >> >> >> *Additional Info* >> 1. I looked for a test case for this. >> According to UriSpec.scala >> <https://github.com/akka/akka-http/blob/b7f13dc36918c870662e5434b15a45ab94594c8e/akka-http-core/src/test/scala/akka/http/scaladsl/model/UriSpec.scala#L508L514>, >> >> Uri("?a=b=c").query() is still invalid, although query() method has default >> mode = Uri.ParsingMode.Relaxed. >> >> >> 2. I didn't fully understand how parsing works .... but probably it's >> because CharacterClases.scala >> <https://github.com/akka/akka-http/blob/b7f13dc36918c870662e5434b15a45ab94594c8e/akka-http-core/src/main/scala/akka/http/impl/model/parser/CharacterClasses.scala#L51> >> defines: >> >> val `relaxed-query-char` = VCHAR -- "%&=#" >> >> where ('=') is made invalid? >> >> UriParser has >> >> private[this] val `query-char` = uriParsingMode match { >> case Uri.ParsingMode.Strict ⇒ `strict-query-char` >> case Uri.ParsingMode.Relaxed ⇒ `relaxed-query-char` >> } >> >> where `relaxed-query-char` is defined as above. >> >> Thanks, >> Richard >> >> -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.