Tobias,

You are touching a good point. This is indeed the default behavior and is 
unexpected for new users. The old reasoning was that hierarchical routers would 
be the default approach but in most cases, flat routers are used.

This can be manually configured using the Router#defaultMatchingMode and 
Router#defaultMatchQuery properties.

I am planning to change this default in Restlet 2.0, see:

"Refactor Routing API"
http://restlet.tigris.org/issues/show_bug.cgi?id=763

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com




-----Message d'origine-----
De : Tobias Girschick [mailto:[email protected]] 
Envoyé : vendredi 28 août 2009 16:45
À : [email protected]
Cc : Buchwald, Fabian
Objet : routing if URI is not specifically assigned

Hi,

I have a question regarding responses on unassigned URIs. If I have the
following valid URI (Resource attached):

localhost:8180/algorithm/learning/classification/kNN

and make a GET request to 

localhost:8180/algorithm/learning/classification/kNN77777

what I get back is the same as for the first URI. 
The same bahavior seems to be true for cases where the back part of an
URI is not linked to a Resource but the first part is valid. So
everything that has the correct base URI will fall back on the base URI 
(e.g. localhost:8180/) if no Resource is attached.

My question is, if this behavior can be turned off and some standard
return status like 400 can be issued instead.

Thanks and best regards,
Tobias

-- 
Dipl.-Bioinf. Tobias Girschick

Technische Universität München
Institut für Informatik
Lehrstuhl I12 - Bioinformatik
Bolzmannstr. 3
85748 Garching b. München, Germany

Room: MI 01.09.042
Phone: +49 (89) 289-18002
Email: [email protected]
Web: http://wwwkramer.in.tum.de/people/girschic

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

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

Reply via email to