Routes are tangled.

23 views
Skip to first unread message

Necto Nekiy

unread,
Feb 21, 2012, 2:09:03 PM2/21/12
to restas
(It is a double for issue#8 on github - https://github.com/archimag/restas/issues/8)

Here is a simple RESTAS application:

(require 'asdf)

(asdf:operate 'asdf:load-op '#:restas)
(restas:define-module #:pack
(:use #:cl))

(in-package #:pack)
(restas:define-route route ("file/*path" :method :get) (format nil "~a
- path" path))
(restas:define-route person-change-route ("person:(id)")
(format nil "~a - person" id))

(restas:define-route nooa ("impossible:(siid)" :method :get) (format
nil "~a - imposible" siid))

(restas:start '#:pack :port 8080)

If it is runned on sbcl 1.0.54, hunchentoot 1.2.2, RESTAS 20111203-
git, produces strange begaviour:
http://localhost:8080/person1 ---> "NIL - imposible"
It goes by the wrong, third, route.
If you comment first, or last route, your will receive:
http://localhost:8080/person1 ---> "1 - person"

Andrey Moskvitin

unread,
Feb 21, 2012, 2:42:35 PM2/21/12
to res...@googlegroups.com
Oh, it is a bug in cl-routes. I fix it. Get cl-routes from Git and try again.

Andrey

2012/2/21 Necto Nekiy <nect...@gmail.com>:

Necto Nekiy

unread,
Feb 22, 2012, 12:00:44 AM2/22/12
to restas
It works, thanks. [Closed]

On Feb 21, 11:42 pm, Andrey Moskvitin <archi...@gmail.com> wrote:
> Oh, it is a bug in cl-routes. I fix it. Get cl-routes from Git and try again.
>
> Andrey
>
> 2012/2/21 Necto Nekiy <necto...@gmail.com>:
>
>
>
>
>
>
>
> > (It is a double for issue#8 on github -https://github.com/archimag/restas/issues/8)
>
> > Here is a simple RESTAS application:
>
> > (require 'asdf)
>
> > (asdf:operate 'asdf:load-op '#:restas)
> > (restas:define-module #:pack
> >   (:use #:cl))
>
> > (in-package #:pack)
> > (restas:define-route route ("file/*path" :method :get) (format nil "~a
> > - path" path))
> > (restas:define-route person-change-route ("person:(id)")
> >                                    (format nil "~a - person" id))
>
> > (restas:define-route nooa ("impossible:(siid)" :method :get) (format
> > nil "~a - imposible" siid))
>
> > (restas:start '#:pack :port 8080)
>
> > If it is runned on sbcl 1.0.54, hunchentoot 1.2.2, RESTAS 20111203-
> > git, produces strange begaviour:
> >http://localhost:8080/person1---> "NIL - imposible"
Reply all
Reply to author
Forward
0 new messages