don't worry about length of response status code
This commit is contained in:
parent
14f2064050
commit
465b5a9115
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue
Block a user