haskellhaskell-waihaskell-warp

How do I force warp to use a status code other than 200 when using ResponseFile?


When trying to produce a custom 404 error, I attempt to respond with responseFile notFound404 [("Content-Type","text/html")] "404.html" Nothing. However, if "404.html" is present in my filesystem, Warp sends the data with status code 200.

Is this behavior expected by servers that support the wai interface? If so, why does responseFile have a status argument?


Solution

  • It looks like a bug in Warp. Can you open an issue on the tracker?