главная|main page

состояние|status

блог|blog

файлы|files

программы|software

summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorJonas Wielicki <j.wielicki@sotecware.net>2018-04-26 20:25:39 +0200
committerJonas Wielicki <j.wielicki@sotecware.net>2018-04-26 20:25:39 +0200
commit9ff5b783cff841bedb0ff28e1eea797598e4c817 (patch)
tree09e72c4d98d27fcc61a7d6b892c24ab4751f5c5a /README.rst
parentbdd36e13bf551a7106b073efbbbae5cfd0b47b3a (diff)
Mention why we don't use xml2
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index 3881f2c..f01783a 100644
--- a/README.rst
+++ b/README.rst
@@ -37,3 +37,7 @@ Implementation Details
* TLS is handled outside of sed for similar reasons. And to keep my sanity (some people might question whether I still have any bit of sanity left).
* Likewise, SRV lookup and composition of the authentication data is entirely handled in bash. This also means that only PLAIN SASL authentication is supported -- SCRAM requires a level of interactivity which would be extremely hard to achieve in sed (not impossible though; we would "just" have to implement base64 and sha1-hmac in sed).
* Since XMPP is a protocol where the client speaks first, we need to hand sed some initial input to allow it to generate a "line" of output (the stream header). We do that with bash, and use that opportunity to pass some configuration to the sed program (namely JID and authentication string).
+
+**Design Considerations**
+
+* We considered using ``xml2`` to convert the XML stream into events; however, it turns out that ``2xm[`` doesn’t like stream resets. Also, using the ``tr`` approach also allows us to detect the end of elements, which is useful for various purposes.