Re: Strange Request-Line when using HTTP Client

2010-08-20 Thread Thierry Boileau
Hello Matthias, sorry for the very late reply. This has been fixed in the 2.0 branch on 12/29/2008. I wonder why it has not been fixed in the 1.1 branch as well. I'll discuss this point with Jérôme. Best regards, Thierry Boileau Hello, I have an issue when using the HTTP Client to send

RE: Can't read content from response !? (2.0rc4)

2010-08-20 Thread Thierry Boileau
Hell Stefan, sorry for the very late answer. I wonder if your code reads the entity once in a hidden way (for logging purpose for example). Then, you waon't be able to read it again, as the input stream has been already consumed. However, in this case, you should see a log trace. Could you

RE: Re: Unable to set Reason Phrase on successful request using Jetty

2010-08-20 Thread Thierry Boileau
Hello Michael, is it possible to add a custom header and read it on client side? Best regards, Thierry Boileau -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2649139

RE: Spring with Restlet Issue !!!

2010-08-20 Thread Thierry Boileau
Hello, The org.restlet.Client#get(String) method has been removed from the 2.0 branch, but is still present in the 1.1 branch. Are you sure to use the 1.1 core archive (org.restlet.jar)? best regards, Thierry Boileau --

Re: Is Multiple Get and Put annotations Possible?

2010-08-20 Thread Thierry Boileau
Hello, I'm afraid this is not possible. You can have only one parameter (there is only one entity in the request). In this case below , I wonder why the Address is not included inside the Contact object. Does it represent the contact's address? @Post public ArrayListContact update(Address

RE: Error responses in JSON or HTML

2010-08-20 Thread Thierry Boileau
Hello Kevin, The negotiation is handled by the Clientinfo class : ClientInfo#getPreferredVariant(ListVariant, MetadataService); where MetadataService is the metadata service of your Restlet application. In the future a conneg service will be used (see

RE: Exception from annotated methods not handled by StatusService in R2.0

2010-08-20 Thread Thierry Boileau
Hello Olivier, you're right, this is the current behaviour. I've entered an issue for that : http://restlet.tigris.org/issues/show_bug.cgi?id=1164 The getStatus method is called if your resource throws ResourceException. Bes tregards, Thierry Boileau

RE: Problems with hanging client calls

2010-08-20 Thread Thierry Boileau
Hello Rickard, did you try with another client connector such as net or httpclient? Do you notice the same behaviour? I have a look at the error handling. Best regards, Thierry Boileau --

Re: Problems with hanging client calls

2010-08-20 Thread Freya Impens
Hi, We had the same issue when upgrading to restlet 2.0.0. Some links about the (I think) same issue: http://restlet.tigris.org/issues/show_bug.cgi?id=1053 andhttp://comments.gmane.org/gmane.comp.java.restlet/12273 It all boils down to calling the exhaust() method on the response

RE: Problems with hanging client calls

2010-08-20 Thread Thierry Boileau
Hi Rickard, I wonder if, in your case, the final server (not the proxy) is unable to send a response, because of the closed socket error (on server side). If so, the internal client connector will wait on the read operation. As there is no timeout on this internal client connector for the

RE: Problem using Base64

2010-08-20 Thread Thierry Boileau
Hello Alexander, this error should happen when the encoded string does not have a right length (should be a multiple of 4). What may happen is that the Base64 encoded string is also encoded in a wrong character set. Best regards, Thierry Boileau

Re: Problems with hanging client calls

2010-08-20 Thread Rickard Öberg
On 2010-08-20 14.25, Thierry Boileau wrote: Hello Rickard, did you try with another client connector such as net or httpclient? Do you notice the same behaviour? I have a look at the error handling. I couldn't figure out how to use them. The docs I found were minimal. Got link? thanks,

Re: Problems with hanging client calls

2010-08-20 Thread Rickard Öberg
On 2010-08-20 15.31, Thierry Boileau wrote: I wonder if, in your case, the final server (not the proxy) is unable to send a response, because of the closed socket error (on server side). If so, the internal client connector will wait on the read operation. As there is no timeout on this

RE: Send parameter in @Get method from Android to GAE

2010-08-20 Thread Thierry Boileau
Hello, actually you can't achieve what you want this way. Parameters located on server resources are dedicated to the enclosed entity of the incoming request. For example, the entity of a POST or a PUT request. This can't apply to GET requests since GET request have no enclosed entity. One way

RE: Re: Problems with hanging client calls

2010-08-20 Thread Thierry Boileau
Hi Rickard, here is the documentation about the connectors. http://wiki.restlet.org/docs_2.0/13-restlet/27-restlet/325-restlet/37-restlet.html If you want to use the net connector, just put the org.restlet.ext.net.jar archive in the classpath (because it relies on the JDK). If you want to use

RE: Re: Problems with hanging client calls

2010-08-20 Thread Thierry Boileau
Hi, We also just now found that the end server was doing Transfer encoding: chunked, which might cause problems. Well, this must not be a problem, even for the internal client, I'll check that. Does the final server send a huge chenked entity? Does the socket error happen during or before the

RE: Restlet have messages.properties like Spring ?

2010-08-20 Thread Thierry Boileau
Hello, you can get the client's preferences via the request#clientInfo#getAcceptedLanguages method, and treat these preferences manually. Another solution is to rely on the content negotiation algorithm that helps to find the best variant that fits the client preferences (in terms of media

RE: Restlet have messages.properties like Spring ?

2010-08-20 Thread Thierry Boileau
opps, I have to finish my mail. I send you a sample HelloWorldResource that : - declares the supported variants via a variants attribute. - generates the right representation via the overriden get(Variant) method. Best regards, Thierry Boileau

RE: Maximum number of concurrent connections

2010-08-20 Thread Thierry Boileau
Hello Nicolas, I'm sorry for my late reply. The internal connector allows to set a maxTotalConnections parameter (described in the javadocs of the BaseHelper class, which is published here: [1]). I've also updated the page dedicated to the connectors [2]. Note that this apply to both client