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 BB919429E25 for ; Fri, 18 Nov 2011 21:26:33 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, 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 fZEcpsLCM62K for ; Fri, 18 Nov 2011 21:26:33 -0800 (PST) Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 013BB431FD0 for ; Fri, 18 Nov 2011 21:26:32 -0800 (PST) Received: by bkaq10 with SMTP id q10so4672002bka.26 for ; Fri, 18 Nov 2011 21:26:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=6Inbz3K0V/G3JS3pKlJFhPk7bTya7nqTBkvTJABAN6U=; b=pCfZ2F2OQ5ZEEKxHAHEKnrUZRluQRN6P5YP054bge3QTEX5T7Hi8/VG3YCylWddDXV wqxNnYRTzgG1+Bo7kmW41+VDhCmTlKjPK/VEt9YGwMh7Z1JB+h7ST+VUroOYpjJFnXa6 tHihAJbtmY0uGGTVMISPAVabBHvKQFZwlpPdg= Received: by 10.204.148.75 with SMTP id o11mr6205284bkv.95.1321680391602; Fri, 18 Nov 2011 21:26:31 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id e18sm2276482bkr.15.2011.11.18.21.26.30 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 Nov 2011 21:26:30 -0800 (PST) From: Dmitry Kurochkin To: Austin Clements Subject: Re: [PATCH] Output unmodified Content-Type header value for JSON format. In-Reply-To: <20111119045957.GQ9351@mit.edu> References: <1321659905-24367-1-git-send-email-dmitry.kurochkin@gmail.com> <87fwhkyisj.fsf@servo.finestructure.net> <87wrawq1dz.fsf@gmail.com> <20111119045957.GQ9351@mit.edu> User-Agent: Notmuch/0.10~rc1+20~gec94ced (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Sat, 19 Nov 2011 09:26:14 +0400 Message-ID: <87ty60pts9.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Sat, 19 Nov 2011 05:26:33 -0000 On Fri, 18 Nov 2011 23:59:57 -0500, Austin Clements wrote: > Quoth Dmitry Kurochkin on Nov 19 at 6:42 am: > > Hi Jamie. > > > > On Fri, 18 Nov 2011 17:58:52 -0800, Jameson Graef Rollins wrote: > > > On Sat, 19 Nov 2011 03:45:05 +0400, Dmitry Kurochkin wrote: > > > > Before the change, notmuch used g_mime_content_type_to_string(3) > > > > function to output Content-Type header value. Turns out it outputs > > > > only "type/subtype" part and ignores all parameters. Also, if there > > > > is no Content-Type header, default "text/plain" value is used. > > > > > > Hi, Dmitry. Can you explain under what circumstances you would need the > > > extra content-type parameters? > > > > Charset is an example of a parameter which you need to render a part > > correctly. > > Can notmuch convert to a common charset, given that, otherwise, every > client is going to have to implement this conversion anyway? > Notmuch can handle charset (and any other) parameters but only for known media types (i.e. text/*). I think it would be useful (especially for human-readable output formats). But it is a separate issue. Notmuch can not convert other types it does not know how to handle. E.g. HTML charset conversion is not as simple as for plain text. AFAIK standard defines charset parameter just for few types. So in general, charset parameter can have any meaning for some custom media type. > (And are there other examples of useful things in the content type?) What is meant by useful? All parameters do have some use. The fact that notmuch does not handle them does not mean they are useless. And notmuch can not handle all parameters just because the list of parameters is not defined. So there is no choice but to let notmuch users see and use these parameters. Regards, Dmitry