2 Commits

Author SHA1 Message Date
465b5a9115 don't worry about length of response status code 2021-11-25 03:26:36 -05:00
14f2064050 updated README 2021-11-25 03:24:58 -05:00
2 changed files with 6 additions and 9 deletions

View File

@@ -16,11 +16,6 @@ You should have received a copy of the GNU Affero General Public
License along with this program. If not, see
<https://www.gnu.org/licenses/>.
## Important Note
This project is not yet ready for release. Everything within it should
be considered unstable and subject to change at any time.
## Executive Summary
This library is inspired very heavily by the
@@ -28,3 +23,8 @@ This library is inspired very heavily by the
package, but does not need to be linked against OpenSSL. Instead, it
uses [tcp-streams](https://hackage.haskell.org/package/tcp-streams) to
provide TLS functionality.
## Pull Requests
Pull requests welcome. That said, please make your pull requests to
the `dev` branch.

View File

@@ -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"