PasteRack.org
Paste # 20877
2020-01-05 14:08:24

Fork as a new paste.

Paste viewed 430 times.


Embed:

web-server bug

  1. #lang web-server
  2.  
  3. ;; This is how it is defined currently
  4. ;; https://github.com/racket/web-server/blob/4601f4d7bee4e1ddc382610ba573105fd81dd5f3/web-server-lib/web-server/lang/web.rkt#L125-L128
  5. (define (redirect/get #:headers [hs null])
  6.   (send/suspend/url
  7.    (lambda (k-url)
  8.      (redirect-to (url->string k-url) see-other #:headers hs))))
  9.  
  10. ; This should be the default (notice no headers)
  11. (define (redirect/get-fixed)
  12.   (send/suspend (λ (url) (redirect-to url see-other))))

=>