I just noticed that if empty string &quot;&quot; is passed into `(redirect-to)`, the response will not include a Location header (even though the header object exists in the response object generated by `(redirect-to)`.<br>
<br>While passing in empty string is a client bug, perhaps it&#39;s better to simply stop the input in the first place?<br><br>If so - below is a plausible patch for web-server/http/redirect.ss<br><br>Thanks,<br>yc<br><br>
--- /usr/local/plt/lib/plt/collects/web-server/http/redirect.ss 2008-11-16 11:34:46.000000000 -0800<br>+++ plt-scheme/web-server/http/redirect.ss      2009-03-03 23:00:10.000000000 -0800<br>@@ -24,7 +24,8 @@<br> <br> (provide/contract<br>
  [redirect-to<br>-  (-&gt;* (string?) (redirection-status? #:headers (listof header?))<br>+  (-&gt;* ((and/c string? (lambda (s) (&gt; (string-length s) 0))))<br>+       (redirection-status? #:headers (listof header?))<br>
        response/full?)]<br>  [redirection-status? (any/c . -&gt; . boolean?)]<br>  [permanently redirection-status?]<br><br><br>