From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4EE3F431E62 for ; Mon, 16 Jan 2012 00:49:08 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oRVV27Pv-4sw for ; Mon, 16 Jan 2012 00:49:07 -0800 (PST) Received: from mail-we0-f181.google.com (mail-we0-f181.google.com [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id B33C2431FC0 for ; Mon, 16 Jan 2012 00:49:07 -0800 (PST) Received: by werh12 with SMTP id h12so1208365wer.26 for ; Mon, 16 Jan 2012 00:49:06 -0800 (PST) Received: by 10.216.138.38 with SMTP id z38mr3234994wei.14.1326703746580; Mon, 16 Jan 2012 00:49:06 -0800 (PST) Received: from hotblack-desiato.hh.sledj.net (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25]) by mx.google.com with ESMTPS id gf8sm21370268wbb.11.2012.01.16.00.49.04 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 16 Jan 2012 00:49:05 -0800 (PST) Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000) id 5DDF39FD88; Mon, 16 Jan 2012 08:49:03 +0000 (GMT) To: Austin Clements , Pieter Praet Subject: Re: [PATCH] Output unmodified Content-Type header value for JSON format. In-Reply-To: <87boq4q23z.fsf@awakening.csail.mit.edu> References: <1321659905-24367-1-git-send-email-dmitry.kurochkin@gmail.com> <87fwhkyisj.fsf@servo.finestructure.net> <87wrawq1dz.fsf@gmail.com> <87d3coxu7s.fsf@servo.finestructure.net> <87r512pru2.fsf@gmail.com> <87ipmewo4z.fsf@servo.finestructure.net> <20111123034021.GL9351@mit.edu> <87ipkglui4.fsf@praet.org> <20120112172840.GC18625@mit.edu> <87ehv2proa.fsf@praet.org> <87boq4q23z.fsf@awakening.csail.mit.edu> User-Agent: Notmuch/0.10.2+186~gd0f7804 (http://notmuchmail.org) Emacs/24.0.92.1 (x86_64-pc-linux-gnu) From: David Edmondson Date: Mon, 16 Jan 2012 08:49:03 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2012 08:49:08 -0000 --=-=-= Content-Type: text/plain On Sun, 15 Jan 2012 12:58:40 -0500, Austin Clements wrote: > Yes. I was mostly reiterating the IRC discussion for Pieter. Since > this discussion, I've stabilized on the pre-fetching notion I described > in id:"20120115003617.GH1801@mit.edu", Will read when I get there. > though I do think we should make this clear in the code: that the rule > for whether the JSON includes a "content" key for a leaf part is > internal to the CLI and that consumers should be prepared to use it if > it's there and to retrieve the content separately if it's not. This > is exactly how the Emacs code happens to work, it just hasn't been > codified anywhere. It's a bit more than 'happens to work' :-) > Looking at it this way gives us more flexibility than the current code > takes advantage of; for example we could omit content from the JSON if > it's over some size threshold since the cost of sending that to a > client that doesn't need it is high while the cost of having the > client retrieve it for itself is relatively low. This, I suspect, brings us back to what may have been Dmitry's original concern. If we codify the current behaviour then we're actually _forcing_ clients to use inline content if it's present, because otherwise they have no way to discover the charset/encoding used for the raw part. That seems as though it could be a problem for some clients. > OTOH, I don't understand the encoding story for HTML, since the encoding > can come from either a header or from the body of the HTML. Does this > make it strictly necessary for the client to handle the encoding? If it can be specified by the content of a part rather than the part headers, then I think that the client will have to be prepared to handle it. Even if not, it might still be more effective to choose that approach - it would remove the need to add arbitrary encoding support to the CLI application. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8T5H8ACgkQaezQq/BJZRbX1QCgjcH8RA7k18AuX1KCrOLqu1f1 NcEAn1D/XyIL6lUFNQH0V3t6MDzSn07D =3UTq -----END PGP SIGNATURE----- --=-=-=--