1.1 --- a/README.txt Mon Oct 29 22:36:16 2012 +0100
1.2 +++ b/README.txt Fri Jan 18 00:36:13 2013 +0100
1.3 @@ -127,7 +127,7 @@
1.4 To send a message signed and encrypted to a resource on localhost:
1.5
1.6 python tests/test_send.py 1C1AAF83 0891463A http://localhost/wiki/ShareTest \
1.7 - 'An update to the Wiki.' 'Another update.'
1.8 + collection update 'An update to the Wiki.' 'Another update.'
1.9
1.10 Here, the first identifier is a reference to the signing key (over which you
1.11 have complete control), and the second identifier is a reference to the
1.12 @@ -146,12 +146,14 @@
1.13 Prepare a message signed with a "detached signature" (note that this does not
1.14 seem to be what gpg calls a detached signature with the --detach-sig option):
1.15
1.16 - python tests/test_message.py 'An update to the Wiki.' 'Another update.' \
1.17 + python tests/test_message.py collection update 'An update to the Wiki.' \
1.18 + 'Another update.' \
1.19 | python tests/test_sign.py 1C1AAF83
1.20
1.21 The complicated recipe based on the individual operations is as follows:
1.22
1.23 - python tests/test_message.py 'An update to the Wiki.' 'Another update.' \
1.24 + python tests/test_message.py collection update 'An update to the Wiki.' \
1.25 + 'Another update.' \
1.26 > test.txt \
1.27 && cat test.txt \
1.28 | gpg --armor -u 1C1AAF83 --detach-sig \
1.29 @@ -162,12 +164,14 @@
1.30
1.31 Prepare a message with an encrypted payload using the above key:
1.32
1.33 - python tests/test_message.py 'An update to the Wiki.' 'Another update.' \
1.34 + python tests/test_message.py collection update 'An update to the Wiki.' \
1.35 + 'Another update.' \
1.36 | python tests/test_encrypt.py 0891463A
1.37
1.38 The complicated recipe based on the individual operations is as follows:
1.39
1.40 - python tests/test_message.py 'An update to the Wiki.' 'Another update.' \
1.41 + python tests/test_message.py collection update 'An update to the Wiki.' \
1.42 + 'Another update.' \
1.43 > test.txt \
1.44 && cat test.txt \
1.45 | gpg --armor -r 0891463A --encrypt --trust-model always \
1.46 @@ -180,13 +184,15 @@
1.47
1.48 Sign and encrypt a message:
1.49
1.50 - python tests/test_message.py 'An update to the Wiki.' 'Another update.' \
1.51 + python tests/test_message.py collection update 'An update to the Wiki.' \
1.52 + 'Another update.' \
1.53 | python tests/test_sign.py 1C1AAF83 \
1.54 | python tests/test_encrypt.py 0891463A
1.55
1.56 The complicated recipe based on the individual operations is as follows:
1.57
1.58 - python tests/test_message.py 'An update to the Wiki.' 'Another update.' \
1.59 + python tests/test_message.py collection update 'An update to the Wiki.' \
1.60 + 'Another update.' \
1.61 > test.txt \
1.62 && cat test.txt \
1.63 | gpg --armor -u 1C1AAF83 --detach-sig \
1.64 @@ -204,3 +210,21 @@
1.65
1.66 Here, the resource "/wiki/ShareTest" on localhost is presented with the
1.67 message.
1.68 +
1.69 +The Message Format
1.70 +------------------
1.71 +
1.72 +Messages are MIME-encoded and consist of one or more update fragments. Where
1.73 +the "Update-Type" header is present and set to a value of "collection", a
1.74 +multipart message describes as many updates as there are parts. Otherwise,
1.75 +only a single update is described by the message.
1.76 +
1.77 +For each update, the "Update-Action" header indicates the action to be taken
1.78 +with the update content. Where it is absent, the content is inserted into the
1.79 +Wiki page specified in the request; where it is present and set to "replace",
1.80 +the content replaces all content on the Wiki page; where it is set to "store",
1.81 +the content is stored in a message store associated with the Wiki page.
1.82 +
1.83 +Each update may describe multiple representations of some content by employing
1.84 +a multipart section containing parts for each of the representations.
1.85 +Alternatively, a single message part may describe a single representation.