Re: Restlet 1.1.1 released
Hi Jérôme, [...] Download links: http://www.restlet.org/downloads/1.1/restlet-1.1.1.exe http://www.restlet.org/downloads/1.1/restlet-1.1.1.zip I wonder if it has been discussed before, but imo it would be nice if the Restlet libs would have the version number encoded in the name, like several extension have already (reflecting the version of the underlying lib). I.e.: org.restlet-1.1.1.jar com.noelios.restlet-1.1.1.jar Best regards, Lars -- http://www.semagia.com
RE: Restlet 1.1.1 released
Hi all, The tagging of our releases is based on Debian policy (http://www.debian.org/releases/). We recommend: - Restlet 1.0 (stable) for production systems - Restlet 1.1 (testing) for new developments or people ready to upgrade frequently to get fixes - Restlet 1.2 (unstable) for Restlet developers or people wanting to leave on the edge with new features We will only consider 1.1 'stable' when is has had a few corrective versions and when 1.2 RC1 will be released. This may seem too conservative, but for example 1.1.0 contained a regression in the Servlet extension for Windows, so it wasn't really ready for production. Best regards, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org/ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com/ http://www.noelios.com _ De : Avi Flax [mailto:[EMAIL PROTECTED] Envoyé : vendredi 31 octobre 2008 18:49 À : discuss@restlet.tigris.org Objet : Re: Restlet 1.1.1 released On Fri, Oct 31, 2008 at 13:08, Stephan Koops [EMAIL PROTECTED] wrote: one the download site Restlet 1.1.1 is marked as testing. Is this planned? I was just wondering this myself. Shouldn't 1.0.11 be relabeled as an archived version at this point, and 1.1.X as stable?
RE: Content negotiation with browsers - advice sought
Hi Jon, Good suggestion! I've added a RFE for this: Enhance documentation on conneg http://restlet.tigris.org/issues/show_bug.cgi?id=641 If you are interested in contributing some doc on this topic, we could create a new web page in our User Guide (wiki) for this. Best regards, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Jon Blower Envoyé : jeudi 30 octobre 2008 10:06 À : discuss@restlet.tigris.org Objet : Re: Content negotiation with browsers - advice sought Thanks Stephan, this is very helpful. I think that some documentation on this subject would be valuable, either in the Javadoc for the TunnelService or elsewhere on the Restlet website. It would be useful to clarify: 1) General background on content negotiation and how it's supposed to work in REST - and how some web browsers break the model (perhaps there are some external pages that can simply be referenced). 2) How Restlet handles content negotation: by default and with the use of tunnels. 3) How to add different file extension-media type mappings and how to find out which ones are provided by default. 4) Similarly, how to add different user agent mappings and what the defaults are. Best wishes, Jon On Tue, Oct 28, 2008 at 7:52 PM, Stephan Koops [EMAIL PROTECTED] wrote: Hi Jon 1) Is the TunnelService essentially a filter that can modify HTTP headers (possibly other things too) before they reach my Resource class? The Restlet Engine uses the data from the TunnelService to initialize the TunnelFilter (part of the engine), which does the work, as you described. As every filter, it could change everything in the request. 2) Why do you consider the userAgentTunnel better than file extensions? Is it simply closer to the REST model? The user agnet filter allow the content negotiation as it is planned, because you are not required to add extensions to your URIs. On the other hand with the extension mapping you have the possibility to request every media type with every client. You could also combine both possibilities. To the closeness to REST: While defining the JAX-RS-API we had a discussion about exactly this feature. Roy Fielding pointed out (see https://jsr311.dev.java.net/servlets/ReadMsg?list=devmsgNo=1458, full thread: https://jsr311.dev.java.net/servlets/BrowseList?listName=devfrom=1196535to =1196535count=31by=threadpaged=false) , that he URI http://abc.de/fgh.html is not the same resource as http://abc.de/fgh, and he is right. These URIs describe two resources, which could (should, ...) point to the same entity (the same business object, see http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm#sec_5 _2_1_1 for details). With reading it is not a big problem, but with modifying: if you edit ./fgh.html (e.g. PUT or DELETE), than this request (from the REST point of view) will not change/delete /fgh.xml, but this is the result, intended by the developer and the client. So the user agent filter is indeed closer to REST. The Restlet filter will evaulate the extension only for GET (and HEAD) requests. But I think, that both are useful. IMO: Use both. If the link is .../fgh (without extension), you get, what your client like (HTML for browser etc, XML or JSON for a web servcie etc.), and if you want a special media type, you could explict use the URI ./fgh.gif 3) If I use a userAgentTunnel how can I distinguish between web page requests (which probably require text/html) and requests from img tags (which probably require image/*)? See above. 4) What's the best documentation to read to learn how to use and configure the TunnelService? I can probably figure things out from the javadoc, but would appreciate some other docs if they exist. I don't knoiw, that there is more documentation. You just need to set the booleans to true. The Restlet Engine should do the rest. It includes a lot of mappings for file extensions (see org.restlet.service.MetadataService.getMetaData(), accessible via Application.getMetadataService()). It also includes a basic configuration for the user agent mapping. There is a propertiy file for it, but I don't know where. Perhaps useragents.properties or something like this. If you have more questions, there is thsi mailing list :-) Perhaps you give good input for more javadoc or something like this. best regards Stephan On Tue, Oct 28, 2008 at 11:51 AM, Stephan Koops [EMAIL PROTECTED] wrote: Hi Jon, in the TunnelService in Restlet 1.1 there is a solution for exactly this problem. Try Application.getTunnelService().setUserAgentTunnel(true). Your proposed workaround with file extensions is also available: Try Application.getTunnelService().setExtensionsTunnel(true). But the first solution is IMO better. best regards Stephan -Ursprüngliche Nachricht-
RE: Restlet and FF in Windows: range out of range
Hi all, I've entered a bug report for this: Fix issues with content ranges http://restlet.tigris.org/issues/show_bug.cgi?id=642 Diego, could you specify which connectors you are using as this way have an impact? A workaround is to turn off content ranges in your application: getRangeService().setEnabled(false); Best regards, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org/ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com/ http://www.noelios.com _ De : Rob Heittman [mailto:[EMAIL PROTECTED] Envoyé : vendredi 31 octobre 2008 16:28 À : discuss@restlet.tigris.org Objet : Re: Restlet and FF in Windows: range out of range This may be connected to a recent issue I've seen with Acrobat 9 not being able to serve up certain PDFs hosted by Restlet -- there are also ranged requests going on there -- Jerome and Thierry contact me direct if you want examples. - Rob On Fri, Oct 31, 2008 at 11:18 AM, Diego Ballve [EMAIL PROTECTED] wrote: Hello, Can somebody take a look at the range headers in these greps? I'm experiencing problems in Windows when serving static files (times out most of the times) and I believe it's due to ranged requests since it works fine linux (1 request). More specifically, why does Restlet answer: Content-Range: bytes 262144-728134/465990.. when Content-Length: 465990..
RE: Router swallowing exceptions
Hi Cliff, Do you still have the issue? If so, could you enter a bug report and attach a reproducible sample so we can figure out what is wrong? Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org/ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com/ http://www.noelios.com _ De : Cliff Binstock [mailto:[EMAIL PROTECTED] Envoye : mardi 28 octobre 2008 18:56 A : discuss@restlet.tigris.org Objet : RE: Router swallowing exceptions I am using V1.1 RC2 Cliff Binstock _ From: Thierry Boileau [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 28, 2008 2:33 AM To: discuss@restlet.tigris.org Subject: Re: Router swallowing exceptions Hello Cliff, I get an Instantiation exception with a warning trace when running with the current trunk. ATTENTION: Exception while instantiating the target handler. java.lang.InstantiationException at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(Instan tiationExceptionConstructorAccessorImpl.java:30) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at org.restlet.Finder.createTarget(Finder.java:186) [...] What release of Restlet are you using? Best regards, Thierry Boileau -- Restlet ~ Core developer ~ http://www.restlet.org http://www.restlet.org/ Noelios Technologies ~ Co-founder ~ http://www.noelios.com http://www.noelios.com/ I unfortunately accidentally discovered that if a Resource is not instantiable (e.g., the class is abstract, constructor is protected, etc.), the router-which is unable to complete its work-does nothing and doesn't log anything either It would be most appreciated if it would log a (probably SEVERE) error if it was unable to instantiate the Resource. For example, if you have this: attach(router, /not-instantiable, com.example.resource.MyAbstractResource.class); and of course: package com.example.resource; public abstract class MyAbstractResource extends Resource { . } Thanks much, Cliff Binstock Coyote Reporting
build fail (revision 3932)
Hi, I just checked out the latest restlet distro from subversion (revision 3932). I am getting the following build failure on the tests: verify-tests: [mkdir] Created dir: /Users/rkobergmac/Documents/workspace/ restlet/build/temp/test [junit] Running com.noelios.restlet.test.NoeliosTestSuite [junit] head [junit]titleStatus page/title [junit] /head [junit] body [junit] h3The server has not found anything matching the request URI/h3pYou can get technical details a href=http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5 here/a.br [junit] Please continue your visit at our a href=/home page/ a. [junit] /p [junit] /body [junit] /html [junit] HTTP/1.1 404 The server has not found anything matching the request URI [junit] Content-Type: text/html; charset=ISO-8859-1 [junit] Content-Length: 330 [junit] Date: Sat, 01 Nov 2008 16:17:32 GMT [junit] Accept-Ranges: bytes [junit] Server: Noelios-Restlet-Engine/1.2.snapshot [junit] [junit] html [junit] head [junit]titleStatus page/title [junit] /head [junit] body [junit] h3The server has not found anything matching the request URI/h3pYou can get technical details a href=http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5 here/a.br [junit] Please continue your visit at our a href=/home page/ a. [junit] /p [junit] /body [junit] /html [junit] ]) [junit] Tests run: 15, Failures: 1, Errors: 0, Time elapsed: 15.312 sec BUILD FAILED /Users/rkobergmac/Documents/workspace/restlet/build/build.xml:1599: Test com.noelios.restlet.test.NoeliosTestSuite failed
Re: build fail (revision 3932)
Running ant build produces the following fail: verify-tests: [junit] Running com.noelios.restlet.test.NoeliosTestSuite [junit] Invalid memory access of location rip=01160767 [junit] [junit] Running com.noelios.restlet.test.NoeliosTestSuite [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec BUILD FAILED /Users/rkobergmac/Documents/workspace/restlet/build/build.xml:1599: Test com.noelios.restlet.test.NoeliosTestSuite failed (crashed) My previous post was running the ant build default. best, -Rob On Nov 1, 2008, at 12:20 PM, Robert Koberg wrote: Hi, I just checked out the latest restlet distro from subversion (revision 3932). I am getting the following build failure on the tests: verify-tests: [mkdir] Created dir: /Users/rkobergmac/Documents/workspace/ restlet/build/temp/test [junit] Running com.noelios.restlet.test.NoeliosTestSuite [junit] head [junit]titleStatus page/title [junit] /head [junit] body [junit] h3The server has not found anything matching the request URI/h3pYou can get technical details a href=http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5 here/a.br [junit] Please continue your visit at our a href=/home page/ a. [junit] /p [junit] /body [junit] /html [junit] HTTP/1.1 404 The server has not found anything matching the request URI [junit] Content-Type: text/html; charset=ISO-8859-1 [junit] Content-Length: 330 [junit] Date: Sat, 01 Nov 2008 16:17:32 GMT [junit] Accept-Ranges: bytes [junit] Server: Noelios-Restlet-Engine/1.2.snapshot [junit] [junit] html [junit] head [junit]titleStatus page/title [junit] /head [junit] body [junit] h3The server has not found anything matching the request URI/h3pYou can get technical details a href=http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5 here/a.br [junit] Please continue your visit at our a href=/home page/ a. [junit] /p [junit] /body [junit] /html [junit] ]) [junit] Tests run: 15, Failures: 1, Errors: 0, Time elapsed: 15.312 sec BUILD FAILED /Users/rkobergmac/Documents/workspace/restlet/build/build.xml:1599: Test com.noelios.restlet.test.NoeliosTestSuite failed
Where to find SVN tags for 1.1-RC2
Hello, i see that the restlet.org SVN does not contains the 1.1-RC2 tags anymore where can I find it? (to check the sources of the 1.1-RC2 milestone). -- Thanks, ~t~
Re: Restlet and FF in Windows: range out of range
Hello, Thanks for the workaround hint. We're using the default NRE connectors, only HTTP for server. We actually have it running behind apache proxy, so we could do set these in the proxy session in apache, once we narrowed down the problem: RequestHeader unset Range RequestHeader unset If-Range Regards, Diego Jerome Louvel wrote: Hi all, I've entered a bug report for this: Fix issues with content ranges http://restlet.tigris.org/issues/show_bug.cgi?id=642 Diego, could you specify which connectors you are using as this way have an impact? A workaround is to turn off content ranges in your application: getRangeService().setEnabled(false); Best regards, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org http://www.restlet.org/ Noelios Technologies ~ Co-founder ~ http://www.noelios.com http://www.noelios.com/ *De :* Rob Heittman [mailto:[EMAIL PROTECTED] *Envoyé :* vendredi 31 octobre 2008 16:28 *À :* discuss@restlet.tigris.org *Objet :* Re: Restlet and FF in Windows: range out of range This may be connected to a recent issue I've seen with Acrobat 9 not being able to serve up certain PDFs hosted by Restlet -- there are also ranged requests going on there -- Jerome and Thierry contact me direct if you want examples. - Rob On Fri, Oct 31, 2008 at 11:18 AM, Diego Ballve [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hello, Can somebody take a look at the range headers in these greps? I'm experiencing problems in Windows when serving static files (times out most of the times) and I believe it's due to ranged requests since it works fine linux (1 request). More specifically, why does Restlet answer: Content-Range: bytes 262144-728134/465990.. when Content-Length: 465990..
Encoder changes in Restlet 1.1.1
Hi there, i had an Application that was using restlet 1.1-RC2 with following snippet: public Restlet createRoot() { // configure configure(); // encoder support Encoder encoder = new Encoder( getContext() ); // create root Router root = new Router( getContext() ); encoder.setNext( root ); ... return encoder; } And it was working just perfect, was returning GZIP transfer-encoding when asked for it (without any trickery in resources et al, just adding this filter as first in root). Example: $ curl -v http://localhost:8081/webapp/js/utils.js -H Accept-Encoding: gzip -H Accept: application/x-javascript * About to connect() to localhost port 8081 (#0) * Trying ::1... Connection refused * Trying fe80::1... Connection refused * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8081 (#0) GET /webapp/js/utils.js HTTP/1.1 User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3 Host: localhost:8081 Accept-Encoding: gzip Accept: text/html HTTP/1.1 200 OK Content-Encoding: gzip Content-Language: en-us Content-Type: application/x-javascript Content-Location: http://localhost:8081/webapp/jsutils.js Date: Sat, 01 Nov 2008 19:41:41 GMT Accept-Ranges: bytes Server: Noelios-Restlet-Engine/1.1.rc2 Transfer-Encoding: chunked GZIP CONTENT FOLLOWS... That was fine. Then, i simply upgraded the project dependencies to restlet 1.1.1, without _any_ code change in app, and it stopped serving GZIP. Everything works, except GZIP. Like restlet is simply neglecting the Accept-Encoding header anymore... (Yes, there is the path problem, look at Content-Location of response, and it is broken in 1.1.1 too, but was working for me). Any thoughts? -- Thanks, ~t~
Re: build fail (revision 3932)
Hello Robert, could you send us the files located in the following directory: build/temp/test? could you tell us which release of the JDK are you using, your operating system, etc.? It works on my XUbuntu 8.04 with jdk 1.5.0.16 and jdk 1.6.0.07. Best regards, Thierry Boileau -- Restlet ~ Core developer ~ http://www.restlet.org http://www.restlet.org/ Noelios Technologies ~ Co-founder ~ http://www.noelios.com http://www.noelios.com/ Running ant build produces the following fail: verify-tests: [junit] Running com.noelios.restlet.test.NoeliosTestSuite [junit] Invalid memory access of location rip=01160767 [junit] [junit] Running com.noelios.restlet.test.NoeliosTestSuite [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec BUILD FAILED /Users/rkobergmac/Documents/workspace/restlet/build/build.xml:1599: Test com.noelios.restlet.test.NoeliosTestSuite failed (crashed) My previous post was running the ant build default. best, -Rob On Nov 1, 2008, at 12:20 PM, Robert Koberg wrote: Hi, I just checked out the latest restlet distro from subversion (revision 3932). I am getting the following build failure on the tests: verify-tests: [mkdir] Created dir: /Users/rkobergmac/Documents/workspace/restlet/build/temp/test [junit] Running com.noelios.restlet.test.NoeliosTestSuite [junit] head [junit]titleStatus page/title [junit] /head [junit] body [junit] h3The server has not found anything matching the request URI/h3pYou can get technical details a href=http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5;here/a.br [junit] Please continue your visit at our a href=/home page/a. [junit] /p [junit] /body [junit] /html [junit] HTTP/1.1 404 The server has not found anything matching the request URI [junit] Content-Type: text/html; charset=ISO-8859-1 [junit] Content-Length: 330 [junit] Date: Sat, 01 Nov 2008 16:17:32 GMT [junit] Accept-Ranges: bytes [junit] Server: Noelios-Restlet-Engine/1.2.snapshot [junit] [junit] html [junit] head [junit]titleStatus page/title [junit] /head [junit] body [junit] h3The server has not found anything matching the request URI/h3pYou can get technical details a href=http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5;here/a.br [junit] Please continue your visit at our a href=/home page/a. [junit] /p [junit] /body [junit] /html [junit] ]) [junit] Tests run: 15, Failures: 1, Errors: 0, Time elapsed: 15.312 sec BUILD FAILED /Users/rkobergmac/Documents/workspace/restlet/build/build.xml:1599: Test com.noelios.restlet.test.NoeliosTestSuite failed