diff --git a/src/Network/Gemini/Capsule/Encoding.hs b/src/Network/Gemini/Capsule/Encoding.hs index 2027916..808ae3b 100644 --- a/src/Network/Gemini/Capsule/Encoding.hs +++ b/src/Network/Gemini/Capsule/Encoding.hs @@ -147,14 +147,11 @@ unescapeString str = case decodeUtf8' $ BS.pack $ toBytes str of encodeGemResponse :: GemResponse -> BSL.ByteString encodeGemResponse resp = let code = respStatus resp - high = code `div` 10 - low = code `mod` 10 meta = respMeta resp body = fromMaybe "" $ respBody resp builder - = word8Dec high - <> word8Dec low + = word8Dec code <> charUtf8 ' ' <> stringUtf8 meta <> stringUtf8 "\r\n"