X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FHttpVersion.hs;h=e1ed0f38024fd9836629c84eee5d9bef20fd46cc;hb=8e78bc83bfe67a376293c346ae0b30f1a684c787;hp=38d0e5b81ad49767621098c06bb499f347bae175;hpb=175e14b3b144537644e65ca76f1fca5c56fd44e9;p=Lucu.git diff --git a/Network/HTTP/Lucu/HttpVersion.hs b/Network/HTTP/Lucu/HttpVersion.hs index 38d0e5b..e1ed0f3 100644 --- a/Network/HTTP/Lucu/HttpVersion.hs +++ b/Network/HTTP/Lucu/HttpVersion.hs @@ -8,13 +8,11 @@ module Network.HTTP.Lucu.HttpVersion ) where -import qualified Data.ByteString.Lazy.Char8 as B -import Data.ByteString.Lazy.Char8 (ByteString) import Network.HTTP.Lucu.Parser import System.IO -- |@'HttpVersion' major minor@ represents \"HTTP\/major.minor\". -data HttpVersion = HttpVersion Int Int +data HttpVersion = HttpVersion !Int !Int deriving (Eq) instance Show HttpVersion where @@ -39,7 +37,8 @@ httpVersionP = do string "HTTP/" hPutHttpVersion :: Handle -> HttpVersion -> IO () hPutHttpVersion h (HttpVersion maj min) - = do hPutStr h "HTTP/" + = h `seq` + do hPutStr h "HTTP/" hPutStr h (show maj) hPutChar h '.' hPutStr h (show min) \ No newline at end of file