[akka-user] Re: akka.http.scaladsl.model.Uri's apply() methods should still take charset and mode parameters?

2016-10-15 Thread Richard Imaoka
Hi,

Raised an issue akka-http#395 

I didn't realize @2beaucoup was you ! It's great I could to talk to you 
here :)
I guess it takes time for me to submit a PR, but hopefully I can still fix 
this a bit later.

Thanks!

2016年10月12日水曜日 18時24分34秒 UTC+9 André:
>
> > The last comment there by 2beaucoup was exactly what I am asking here.
>
> That's me BTW.
>
> There's no reason one can't pick up on this with an issue/PR in 
> akka/akka-http. ;)
>
> Cheers
> André
>
> On Tuesday, October 11, 2016 at 7:39:57 PM UTC+2, Richard Imaoka wrote:
>>
>> Thank you, I was missing that discussion. The last comment there by 
>> 2beaucoup was exactly what I am asking here.
>> It seems the question was not answered yet?
>>
>> Thanks
>>
>> 2016年10月10日月曜日 17時16分24秒 UTC+9 André:
>>>
>>> Hi Richard!
>>>
>>> See [1] for the discussion related to your question.
>>>
>>> [1] https://github.com/akka/akka/pull/18715#discussion-diff-41831981
>>>
>>> Cheers
>>> André
>>>
>>> On Sunday, October 9, 2016 at 6:49:23 PM UTC+2, Richard Imaoka wrote:

 Hi,

 While I was trying to work on akka/akka-http#276 
 , I noticed something 
 strange.

 After akka/akka#18479  was 
 fixed (PR to fix #18479 = akka/akka#18715 
 ), now the following is 
 possible.
 Isn't it non-intuitive that you can specify Uri.ParsingMode twice - 
 once in Uri() and secondly in query() method?


 val uri = Uri("http://localhost?a^=b;, mode=Uri.ParsingMode.Relaxed)

 //prints Some(b)
 println(uri.query(mode=Uri.ParsingMode.Relaxed).get("a^"))

 //IllegalUriException: Illegal query: Invalid input '^',
 // expected '+', '=', query-char, 'EOI', '&' or pct-encoded
 // (line 1, column 2): a^=b
 println(uri.query(mode=Uri.ParsingMode.Strict).get("a^"))




 If parsing a query string should be deferred as in akka/akka#18479 
 , should we not pass mode as well 
 as charset into akka.http.scaladsl.model.Uri companion object's apply() 
 methods?

 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.


[akka-user] Re: akka.http.scaladsl.model.Uri's apply() methods should still take charset and mode parameters?

2016-10-12 Thread André
> The last comment there by 2beaucoup was exactly what I am asking here.

That's me BTW.

There's no reason one can't pick up on this with an issue/PR in 
akka/akka-http. ;)

Cheers
André

On Tuesday, October 11, 2016 at 7:39:57 PM UTC+2, Richard Imaoka wrote:
>
> Thank you, I was missing that discussion. The last comment there by 
> 2beaucoup was exactly what I am asking here.
> It seems the question was not answered yet?
>
> Thanks
>
> 2016年10月10日月曜日 17時16分24秒 UTC+9 André:
>>
>> Hi Richard!
>>
>> See [1] for the discussion related to your question.
>>
>> [1] https://github.com/akka/akka/pull/18715#discussion-diff-41831981
>>
>> Cheers
>> André
>>
>> On Sunday, October 9, 2016 at 6:49:23 PM UTC+2, Richard Imaoka wrote:
>>>
>>> Hi,
>>>
>>> While I was trying to work on akka/akka-http#276 
>>> , I noticed something 
>>> strange.
>>>
>>> After akka/akka#18479  was 
>>> fixed (PR to fix #18479 = akka/akka#18715 
>>> ), now the following is 
>>> possible.
>>> Isn't it non-intuitive that you can specify Uri.ParsingMode twice - once 
>>> in Uri() and secondly in query() method?
>>>
>>>
>>> val uri = Uri("http://localhost?a^=b;, mode=Uri.ParsingMode.Relaxed)
>>>
>>> //prints Some(b)
>>> println(uri.query(mode=Uri.ParsingMode.Relaxed).get("a^"))
>>>
>>> //IllegalUriException: Illegal query: Invalid input '^',
>>> // expected '+', '=', query-char, 'EOI', '&' or pct-encoded
>>> // (line 1, column 2): a^=b
>>> println(uri.query(mode=Uri.ParsingMode.Strict).get("a^"))
>>>
>>>
>>>
>>>
>>> If parsing a query string should be deferred as in akka/akka#18479 
>>> , should we not pass mode as well 
>>> as charset into akka.http.scaladsl.model.Uri companion object's apply() 
>>> methods?
>>>
>>> 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.


[akka-user] Re: akka.http.scaladsl.model.Uri's apply() methods should still take charset and mode parameters?

2016-10-11 Thread Richard Imaoka
Thank you, I was missing that discussion. The last comment there by 
2beaucoup was exactly what I am asking here.
It seems the question was not answered yet?

Thanks

2016年10月10日月曜日 17時16分24秒 UTC+9 André:
>
> Hi Richard!
>
> See [1] for the discussion related to your question.
>
> [1] https://github.com/akka/akka/pull/18715#discussion-diff-41831981
>
> Cheers
> André
>
> On Sunday, October 9, 2016 at 6:49:23 PM UTC+2, Richard Imaoka wrote:
>>
>> Hi,
>>
>> While I was trying to work on akka/akka-http#276 
>> , I noticed something 
>> strange.
>>
>> After akka/akka#18479  was 
>> fixed (PR to fix #18479 = akka/akka#18715 
>> ), now the following is 
>> possible.
>> Isn't it non-intuitive that you can specify Uri.ParsingMode twice - once 
>> in Uri() and secondly in query() method?
>>
>>
>> val uri = Uri("http://localhost?a^=b;, mode=Uri.ParsingMode.Relaxed)
>>
>> //prints Some(b)
>> println(uri.query(mode=Uri.ParsingMode.Relaxed).get("a^"))
>>
>> //IllegalUriException: Illegal query: Invalid input '^',
>> // expected '+', '=', query-char, 'EOI', '&' or pct-encoded
>> // (line 1, column 2): a^=b
>> println(uri.query(mode=Uri.ParsingMode.Strict).get("a^"))
>>
>>
>>
>>
>> If parsing a query string should be deferred as in akka/akka#18479 
>> , should we not pass mode as well 
>> as charset into akka.http.scaladsl.model.Uri companion object's apply() 
>> methods?
>>
>> 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.


[akka-user] Re: akka.http.scaladsl.model.Uri's apply() methods should still take charset and mode parameters?

2016-10-10 Thread André
Hi Richard!

See [1] for the discussion related to your question.

[1] https://github.com/akka/akka/pull/18715#discussion-diff-41831981

Cheers
André

On Sunday, October 9, 2016 at 6:49:23 PM UTC+2, Richard Imaoka wrote:
>
> Hi,
>
> While I was trying to work on akka/akka-http#276 
> , I noticed something 
> strange.
>
> After akka/akka#18479  was fixed 
> (PR to fix #18479 = akka/akka#18715 
> ), now the following is possible.
> Isn't it non-intuitive that you can specify Uri.ParsingMode twice - once 
> in Uri() and secondly in query() method?
>
>
> val uri = Uri("http://localhost?a^=b;, mode=Uri.ParsingMode.Relaxed)
>
> //prints Some(b)
> println(uri.query(mode=Uri.ParsingMode.Relaxed).get("a^"))
>
> //IllegalUriException: Illegal query: Invalid input '^',
> // expected '+', '=', query-char, 'EOI', '&' or pct-encoded
> // (line 1, column 2): a^=b
> println(uri.query(mode=Uri.ParsingMode.Strict).get("a^"))
>
>
>
>
> If parsing a query string should be deferred as in akka/akka#18479 
> , should we not pass mode as well as 
> charset into akka.http.scaladsl.model.Uri companion object's apply() methods?
>
> 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.