[PATCH 1/4] show: indicate length of omitted body content (json)

Jameson Graef Rollins jrollins at finestructure.net
Sun Aug 5 14:37:02 PDT 2012


On Sun, Aug 05 2012, Peter Wang <novalazy at gmail.com> wrote:
> If a leaf part's body content is omitted, return the content length 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.
> ---
>  devel/schemata |    5 ++++-
>  notmuch-show.c |    8 ++++++++
>  2 files changed, 12 insertions(+), 1 deletions(-)
>
> diff --git a/devel/schemata b/devel/schemata
> index 9cb25f5..3df2764 100644
> --- a/devel/schemata
> +++ b/devel/schemata
> @@ -69,7 +69,10 @@ 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 content-length
> +    # may be included instead.
> +    content-length?: int

Hey, Peter.  Something somewhere, and probably at least here in the
schemata, should mention what the uids are (b? kB? KiB? YiB?)

jamie.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120805/bc63fe25/attachment.pgp>


More information about the notmuch mailing list