You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I mistakenly typed out the following server code from the tutorial:
module Main where
import Control.Monad
import Happstack.Server (nullConf, simpleHTTP, ok, dir, seeOther)
main :: IO ()
main = simpleHTTP nullConf $ msum
[ dir "hello" $ ok "Hello, World!"
, dir "goodbye" $ ok "Goodbye, World!"
, seeOther "/hello\n" "/hello"
]
Note the \n character in the first call to seeOther. This is obviously not a sensible thing for me to have done, however happstack handles it by returning a empty Location: in the header which doesn't seem like the right thing to do? Here's a link for unit tests that show this behaviour.
The text was updated successfully, but these errors were encountered:
mattyw
changed the title
seeOther return empty string for location is \n appears in argument
seeOther return empty string for location if \n appears in argument
Feb 17, 2017
I mistakenly typed out the following server code from the tutorial:
Note the
\n
character in the first call to seeOther. This is obviously not a sensible thing for me to have done, however happstack handles it by returning a emptyLocation:
in the header which doesn't seem like the right thing to do? Here's a link for unit tests that show this behaviour.https://github.com/Happstack/happstack-server/compare/master...mattyw:01-seeOther-newline?expand=1
The text was updated successfully, but these errors were encountered: