<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 25, 2014 at 10:32 AM, Tadeas Kriz <span dir="ltr">&lt;<a href="mailto:tkriz@redhat.com" target="_blank">tkriz@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
—<br>
Tadeas Kriz<br>
<div class=""><br>
On 24 Jul 2014, at 05:44 pm, Karel Piwko &lt;<a href="mailto:kpiwko@redhat.com">kpiwko@redhat.com</a>&gt; wrote:<br>
<br>
&gt; On Thu, Jul 24, 2014 at 3:28 PM, Tadeas Kriz &lt;<a href="mailto:tkriz@redhat.com">tkriz@redhat.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; It should not. For hibernate, it’s just a string like any other.<br>
&gt;&gt; The problem might be in the configuration of <a href="http://JAX.RS/RestEasy" target="_blank">JAX.RS/RestEasy</a>. If<br>
&gt;&gt; I’ll have some time today evening, I’ll try to fix it, it should<br>
&gt;&gt; be an easy fix.<br>
&gt;<br>
&gt; Last famous words? ;-)<br>
&gt;<br>
<br>
</div>I shall never say “an easy fix” again.<br>
<div class=""><br>
&gt; But I agree. Everything is string and URL encode should happen on<br>
&gt; client while server should automatically decode and work always with<br>
&gt; just decoded string. If we need to encode twice, something is wrong.<br>
&gt;<br>
<br>
</div>Anyway, the 400 Bad request response is made by the tomcat itself, disallowing the use of %2F as a path parameter. This will probably apply on other web containers.<br>
<br>
Possible solutions with their disadvantages:<br>
<br>
1. well-documented double-encoding of the URL (might be confusing)<br></blockquote><div><br></div><div>well, yeah :) that would be my choice; even if it sucks</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

2. use @QueryParam instead of @PathParam (breaks the api consistence, as every other call would still use @PathParam)<br>
3. allow @QueryParam (again, breaks the api consistence, but only for the SimplePush)<br></blockquote><div><br></div><div>-1 on any API chagne</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

4. find another encoding (Base64 for URL = URLEncode then Base64 encode)<br></blockquote><div><br></div><div>not sure </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

5. don’t use the url as a deviceToken (might not comply with Mozzila’s SimplePush specs)<br></blockquote><div><br></div><div>does dan&#39;s regex work (for all platforms), I&#39;d vote for that, otherwise option 1</div><div>
<br></div><div><br></div><div>-M</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
What do you think guys?<br>
<div class="HOEnZb"><div class="h5"><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; aerogear-dev mailing list<br>
&gt; <a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br>
<br>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>
sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div></div>