Abstract stuffed-url
svn: r6376
This commit is contained in:
parent
18a781d6cc
commit
6305d748cf
|
@ -8,6 +8,7 @@
|
|||
; XXX different ways to hash, different ways to store (maybe cookie?)
|
||||
|
||||
(provide stuff-url
|
||||
stuffed-url?
|
||||
extend-url-query
|
||||
unstuff-url)
|
||||
|
||||
|
@ -36,6 +37,12 @@
|
|||
(error "the url is too big: " (url->string result-uri)))
|
||||
result-uri)
|
||||
|
||||
(define (stuffed-url? uri)
|
||||
(let* ([qry (url-query uri)]
|
||||
[l-code (find-binding 'c qry)])
|
||||
(and l-code
|
||||
#t)))
|
||||
|
||||
(define (extend-url-query uri key val)
|
||||
(make-url
|
||||
(url-scheme uri)
|
||||
|
|
|
@ -90,10 +90,8 @@
|
|||
(or
|
||||
; Look in url for c=<k>
|
||||
(let* ([ses (current-session)]
|
||||
[req-url (request-uri req)]
|
||||
[qry (url-query req-url)]
|
||||
[l-code (find-binding 'c qry)])
|
||||
(and l-code
|
||||
[req-url (request-uri req)])
|
||||
(and (stuffed-url? req-url)
|
||||
(deserialize
|
||||
(unstuff-url
|
||||
req-url (session-url ses)
|
||||
|
|
Loading…
Reference in New Issue
Block a user