unknown-page.rkt 503 B

12345678910111213141516171819
  1. #lang racket
  2. (require "../response.rkt"
  3. "../html-proc.rkt"
  4. web-server/servlet)
  5. (provide respond-unknown-file)
  6. (define (respond-unknown-file req)
  7. (display "REQUEST:") (displayln req)
  8. (displayln "RESPONSE:") (displayln (finalize-html-content (render-404)))
  9. (make-response #:code 404
  10. #:message #"ERROR"
  11. (finalize-html-content (render-404))))
  12. (define (render-404)
  13. `(html (head (title "404 - not found"))
  14. (body (h1 "unknown route"))))