Re: restlet TunnelFilter incorrectly removing + from query params

2013-12-05 Thread Thierry Boileau
Hi Rob,

To my mind, there is a problem in the current implementation.
Before the tunnel checks the query, it decodes it using the UTF-8 character
set by default.
In case the tunnel has detected and filtered a query parameter, it computes
a new query by removing the filtered query parameter. This new query is
then encoded before being set to the request but without any character set.
I wonder why no encoding has been defined.

Best regards,
Thierry


2013/12/5 Thierry Boileau tboil...@restlet.com

 Hello Rob,

 I have time today to check what happens.

 Best regards,
 Thierry Boileau


 2013/12/2 Rob Elsner r...@wowza.com

 I opened this issue;
 https://github.com/restlet/restlet-framework-java/issues/804

 but I haven't heard anything back.

 I'm curious if anyone has an opinion on restlet and how the TUnnelFilter
 is re-encoding a + symbol.  I think in this case the parameters are already
 decoded, so any + should have come from a %2b and should be re-encoded as a
 %2b, not a space (%20).  This only happens when ?media= is used in the
 query parameters, if this is left out then the %2b is forwarded correctly
 to my controller.

 Thanks in advance,
 Rob

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3069588




--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3069783

Re: Cookie domain not set

2013-12-05 Thread Thierry Boileau
Hello,

I've made some tests and notice that the browser (at least Firefox and
chromium) doesn't send the domain data in the cookie header. Thus the value
is not set at the cookie level.
If you really need the domain, you can infer it from the request's
reference:
request.getResourceRef().getHostDomain()

By doing do, you will get the full name of the request's domain.

If you still need to read the domain from the cookie inside the code of
your resources, you can also add a filter in front of your resources that
completes the current cookies, and add the domain parameter taken from the
request's reference.

Best regards,
Thierry Boileau

ps :
// First server response, that requires the browser to record a cookie.
HTTP/1.1 200 OK
Content-Length: 12
Content-Type: text/plain; charset=UTF-8
Date: Thu, 05 Dec 2013 09:02:04 GMT
Accept-Ranges: bytes
Server: Restlet-Framework/@major-number@.@minor-number@@release-type@
@release-number@
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
Set-Cookie: test=myvalue; Domain=.tboi.net

hello, world

// Second client request, note the cookie header, without domain data.
GET /hello HTTP/1.1
Host: yop.tboi.net:
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:25.0) Gecko/20100101
Firefox/25.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip, deflate
Cookie: test=myvalue
Connection: keep-alive
Cache-Control: max-age=0



2013/11/22 Mathieu Gond mamath...@hotmail.com

 Hello Everybody,

 We are trying to read Cookies (getRequest().getCookies()) in a
 ServerResource and We can't get the domain (getDomaine()) because it is not
 set.

 Is there a reason that it is not set or is it a bug (We are using restlet
 JavaSE 2.0.5)

 Thanks in advance

 Mathieu and Thierry

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3069051


--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3069787

Re: GWT Restlet cross domain Put request

2013-12-05 Thread Thierry Boileau
Hello,

I can not get these methods to work using Restlet GWT, are these methods
supported.
yes, these methods are supported.
I've never tested such method in a cross-domain context.

Best eregards,
Thierry Boileau


2013/11/18 Larry larry.edward...@roames.com.au

 Hi there

 I have read extensively about (SOP) Same Origin Policy and the issues in
 the Browser.
 I can successfully execute cross domain gets by setting the headers in the
 server to allow the request (Access-Control-Allow-Origin, *).

 The question is, are there different headers to allow post and put?
 I can not get these methods to work using Restlet GWT, are these methods
 supported.

 If so, can someone point me to an  example of GWT calling cross domain
 put/post, I have searched for example with no luck.

 --

 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3068652


--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3069789