Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 4F42D6DE0924 for ; Sat, 26 Sep 2015 02:37:58 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.525 X-Spam-Level: X-Spam-Status: No, score=-0.525 tagged_above=-999 required=5 tests=[AWL=0.195, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c9jL9FXIQniP for ; Sat, 26 Sep 2015 02:37:56 -0700 (PDT) Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by arlo.cworth.org (Postfix) with ESMTPS id 0ABDC6DE00AC for ; Sat, 26 Sep 2015 02:35:45 -0700 (PDT) Received: by wicge5 with SMTP id ge5so48404252wic.0 for ; Sat, 26 Sep 2015 02:35:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=IHb2oN5B4FZk2q1bRdNtlR9rHZgU2qvg+XAFJmPm+TQ=; b=cOZfeh7d8a6wdUGVnLE0wWoZ2cpzLE+KTZoULWh3Z3cTlbgIodNQox57y9p1+/x8ig QuCpxVxNHQcDbBv+LvWg+gDfPpdk87OOz7GyMktOw0+VMkr+5T0EqUODzJFy2wvpdrIn WEl2h4iq6eOd6Yw/N6oso45gIMFtseBVruFo1lTLQmcXm40iL2oxV/QkquKH+BIPhIPK YFdg+FuEDEn4bdpnP4mCxuNGy9b+tg63+4fsdbP7sqMyk5KsIETNbTsq0FhSk8KsVUw9 LTngSgG4OC1ksaLX/tHxQmB/6Tdl8HinpF2xCMbgu2cS6Gij9su8ssRaOAGojazs+N9z FbCQ== X-Gm-Message-State: ALoCoQlW+0qXNQ5AhCyowipLliVq8VAGKuylcRK3dA5jiTLOMX/uRb0F3LSO5lnSLyGpFZ55T9OK X-Received: by 10.180.37.133 with SMTP id y5mr7802320wij.15.1443260142761; Sat, 26 Sep 2015 02:35:42 -0700 (PDT) Received: from localhost (mobile-access-bcee63-221.dhcp.inet.fi. [188.238.99.221]) by smtp.gmail.com with ESMTPSA id pk7sm7566731wjb.2.2015.09.26.02.35.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 Sep 2015 02:35:42 -0700 (PDT) From: Jani Nikula To: David Bremner , Johannes Schauer , notmuch@notmuchmail.org Subject: [PATCH 1/2] lib: content disposition values are not case-sensitive Date: Sat, 26 Sep 2015 12:35:21 +0300 Message-Id: <1443260122-5122-1-git-send-email-jani@nikula.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <871tdvvoyf.fsf@tesseract.cs.unb.ca> References: <871tdvvoyf.fsf@tesseract.cs.unb.ca> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.18 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, 26 Sep 2015 09:37:58 -0000 Per RFC 2183, the values for Content-Disposition values are not case-sensitive. While at it, use the gmime function for getting at the disposition string instead of referencing the field directly. This fixes "attachment" tagging and filename term generation for attachments while indexing. --- lib/index.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/index.cc b/lib/index.cc index e81aa8190288..f166aefd2fc1 100644 --- a/lib/index.cc +++ b/lib/index.cc @@ -377,7 +377,8 @@ _index_mime_part (notmuch_message_t *message, disposition = g_mime_object_get_content_disposition (part); if (disposition && - strcmp (disposition->disposition, GMIME_DISPOSITION_ATTACHMENT) == 0) + strcasecmp (g_mime_content_disposition_get_disposition (disposition), + GMIME_DISPOSITION_ATTACHMENT) == 0) { const char *filename = g_mime_part_get_filename (GMIME_PART (part)); -- 2.1.4