Handle unknown requests better within controllers
This commit is contained in:
parent
c9e0e311bb
commit
263eb0e0a9
5 changed files with 14 additions and 9 deletions
|
|
@ -114,7 +114,8 @@
|
||||||
(target_commit ,(parse-commit conn) #:required)))))
|
(target_commit ,(parse-commit conn) #:required)))))
|
||||||
(render-compare/packages mime-types
|
(render-compare/packages mime-types
|
||||||
conn
|
conn
|
||||||
parsed-query-parameters)))))
|
parsed-query-parameters)))
|
||||||
|
(_ #f)))
|
||||||
|
|
||||||
(define (render-compare mime-types
|
(define (render-compare mime-types
|
||||||
conn
|
conn
|
||||||
|
|
|
||||||
|
|
@ -202,11 +202,12 @@
|
||||||
(uri-path (request-uri request)))
|
(uri-path (request-uri request)))
|
||||||
|
|
||||||
(define (delegate-to f)
|
(define (delegate-to f)
|
||||||
(f request
|
(or (f request
|
||||||
method-and-path-components
|
method-and-path-components
|
||||||
mime-types
|
mime-types
|
||||||
body
|
body
|
||||||
conn))
|
conn)
|
||||||
|
(not-found (request-uri request))))
|
||||||
|
|
||||||
(match method-and-path-components
|
(match method-and-path-components
|
||||||
(('GET)
|
(('GET)
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,8 @@
|
||||||
(render-job mime-types
|
(render-job mime-types
|
||||||
conn
|
conn
|
||||||
job-id
|
job-id
|
||||||
parsed-query-parameters)))))
|
parsed-query-parameters)))
|
||||||
|
(_ #f)))
|
||||||
|
|
||||||
(define (render-jobs mime-types conn)
|
(define (render-jobs mime-types conn)
|
||||||
(render-html
|
(render-html
|
||||||
|
|
|
||||||
|
|
@ -207,4 +207,5 @@
|
||||||
"/latest-processed-revision"))
|
"/latest-processed-revision"))
|
||||||
(render-unknown-revision mime-types
|
(render-unknown-revision mime-types
|
||||||
conn
|
conn
|
||||||
commit-hash))))))
|
commit-hash))))
|
||||||
|
(_ #f)))
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,8 @@
|
||||||
#:path-base path))
|
#:path-base path))
|
||||||
(render-unknown-revision mime-types
|
(render-unknown-revision mime-types
|
||||||
conn
|
conn
|
||||||
commit-hash)))))
|
commit-hash)))
|
||||||
|
(_ #f)))
|
||||||
|
|
||||||
(define (texinfo->variants-alist s)
|
(define (texinfo->variants-alist s)
|
||||||
(let ((stexi (texi-fragment->stexi s)))
|
(let ((stexi (texi-fragment->stexi s)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue