Hi,

I have slightly changed routing in WebYaST (in the both components).

The problem was that e.g. repositories/show/openSUSE-11.2.xml request was 
parsed to
:id => "openSUSE-11", :format => "2". That obviously could not work properly.

It was fixed by specifying requirements for :id parsing:

In the service:
:requirements => {:id => /[^\/]*(?=\.html|\.xml|\.json)|.+/ }

In the client:
:requirements => {:id => /[^\/]*(?=\.html|\.js)|.+/ }


Now whole string is used for :id, if there is a predefined suffix it is 
excluded from
the :id.

The regexps have to be modified if we need to support a new format in the 
future.


(For more details about routing see:
http://guides.rubyonrails.org/routing.html
http://api.rubyonrails.org/classes/ActionController/Routing.html
http://zargony.com/2009/05/05/routing-parameters-with-a-dot )


--

Best Regards

Ladislav Slezák
Yast Developer
------------------------------------------------------------------------
SUSE LINUX, s.r.o.                              e-mail: [email protected]
Lihovarská 1060/12                              tel: +420 284 028 960
190 00 Prague 9                                 fax: +420 284 028 951
Czech Republic                                  http://www.suse.cz/
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to