[racket] Strange behavior of web application , or may be not

From: Veer (diggerrrrr at gmail.com)
Date: Mon Jun 27 09:56:08 EDT 2011


When I run this web application (given below) , I get strange behavior
 , don't know if
this is correct behavior or not.

Follow/click the link in sequence :
1. Create Something
2. Start again
3. View

So , when I click "view" I get exception instead of blank page.

code :
#lang web-server/insta
(define (start request)
  (do-1 request))

(define (do-1 request)
  (define (resp make-url)
       (body (a ((href ,(make-url view))) "View")
             (a ((href ,(make-url create-something))) "Create something")))))

  (define (create-something request)

  (define (view request)

  (send/suspend/dispatch resp))

(define (recur)
  (error 'oops "WHY ARE WE HERE?")

(define (do-something)
  (define (resp make-url)
       (body (a ((href ,(make-url start))) "Start again")))))
  (send/suspend/dispatch resp))


Posted on the users mailing list.