aantron/dream

Dream.redirect should limit to 30x status code only and return empty body

Closed this issue · 0 comments

Related code:

dream/src/pure/inmost.ml

Lines 473 to 481 in 65738df

let redirect ?status ?code ?headers _request location =
let status =
match status, code with
| None, None -> Some (`See_Other)
| _ -> status
in
response ?status ?code ?headers location
|> with_header "Location" location
|> Lwt.return

Limit status to Dream.redirection type