Compare commits
2 Commits
v0.1.0
...
465b5a9115
| Author | SHA1 | Date | |
|---|---|---|---|
| 465b5a9115 | |||
| 14f2064050 |
10
README.md
10
README.md
@@ -16,11 +16,6 @@ You should have received a copy of the GNU Affero General Public
|
|||||||
License along with this program. If not, see
|
License along with this program. If not, see
|
||||||
<https://www.gnu.org/licenses/>.
|
<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
|
## Executive Summary
|
||||||
|
|
||||||
This library is inspired very heavily by the
|
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
|
package, but does not need to be linked against OpenSSL. Instead, it
|
||||||
uses [tcp-streams](https://hackage.haskell.org/package/tcp-streams) to
|
uses [tcp-streams](https://hackage.haskell.org/package/tcp-streams) to
|
||||||
provide TLS functionality.
|
provide TLS functionality.
|
||||||
|
|
||||||
|
## Pull Requests
|
||||||
|
|
||||||
|
Pull requests welcome. That said, please make your pull requests to
|
||||||
|
the `dev` branch.
|
||||||
|
|||||||
@@ -147,14 +147,11 @@ unescapeString str = case decodeUtf8' $ BS.pack $ toBytes str of
|
|||||||
encodeGemResponse :: GemResponse -> BSL.ByteString
|
encodeGemResponse :: GemResponse -> BSL.ByteString
|
||||||
encodeGemResponse resp = let
|
encodeGemResponse resp = let
|
||||||
code = respStatus resp
|
code = respStatus resp
|
||||||
high = code `div` 10
|
|
||||||
low = code `mod` 10
|
|
||||||
meta = respMeta resp
|
meta = respMeta resp
|
||||||
body = fromMaybe "" $ respBody resp
|
body = fromMaybe "" $ respBody resp
|
||||||
|
|
||||||
builder
|
builder
|
||||||
= word8Dec high
|
= word8Dec code
|
||||||
<> word8Dec low
|
|
||||||
<> charUtf8 ' '
|
<> charUtf8 ' '
|
||||||
<> stringUtf8 meta
|
<> stringUtf8 meta
|
||||||
<> stringUtf8 "\r\n"
|
<> stringUtf8 "\r\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user