aboutsummaryrefslogtreecommitdiffhomepage
path: root/devel
diff options
context:
space:
mode:
authorGravatar Peter Wang <novalazy@gmail.com>2012-12-16 10:24:23 +1100
committerGravatar David Bremner <bremner@debian.org>2012-12-17 09:10:35 -0400
commitb96ba6326af442edfdad59e5e42ea42892cd3c6b (patch)
treea41fa759c3db924e080b30671983ec7a3a883a26 /devel
parent35860e00d1a1f1c4116b03a23c2bbeb0089aa4a1 (diff)
show: indicate length, encoding of omitted body content
If a leaf part's body content is omitted, return the encoded length and transfer encoding in --format=json output. This information may be used by the consumer, e.g. to decide whether to download a large attachment over a slow link. Returning the _encoded_ content length is more efficient than returning the _decoded_ content length. Returning the transfer encoding allows the consumer to estimate the decoded content length.
Diffstat (limited to 'devel')
-rw-r--r--devel/schemata9
1 files changed, 8 insertions, 1 deletions
diff --git a/devel/schemata b/devel/schemata
index 292f2876..2405756e 100644
--- a/devel/schemata
+++ b/devel/schemata
@@ -77,7 +77,14 @@ part = {
# A leaf part's body content is optional, but may be included if
# it can be correctly encoded as a string. Consumers should use
# this in preference to fetching the part content separately.
- content?: string
+ content?: string,
+ # If a leaf part's body content is not included, the length of
+ # the encoded content (in bytes) may be given instead.
+ content-length?: int,
+ # If a leaf part's body content is not included, its transfer encoding
+ # may be given. Using this and the encoded content length, it is
+ # possible for the consumer to estimate the decoded content length.
+ content-transfer-encoding?: string
}
# The headers of a message or part (format_headers_sprinter with reply = FALSE)