From 5ccde65f15264796accd1136bbd1199fdd5327d6 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Sun, 18 Aug 2013 18:10:56 +0300 Subject: [PATCH] Re: [PATCH] test: Canonicalize RFC 2047 encoding and charset --- 55/47d7f00bb8c3b557566b0bdb664f865807efa8 | 108 ++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 55/47d7f00bb8c3b557566b0bdb664f865807efa8 diff --git a/55/47d7f00bb8c3b557566b0bdb664f865807efa8 b/55/47d7f00bb8c3b557566b0bdb664f865807efa8 new file mode 100644 index 000000000..a1a238fe8 --- /dev/null +++ b/55/47d7f00bb8c3b557566b0bdb664f865807efa8 @@ -0,0 +1,108 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 1E40E429E59 + for ; Sun, 18 Aug 2013 08:11:09 -0700 (PDT) +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 tSZmEJRo4SJd for ; + Sun, 18 Aug 2013 08:10:59 -0700 (PDT) +Received: from mail-bk0-f49.google.com (mail-bk0-f49.google.com + [209.85.214.49]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 6FD21431FDB + for ; Sun, 18 Aug 2013 08:10:59 -0700 (PDT) +Received: by mail-bk0-f49.google.com with SMTP id r7so1107526bkg.8 + for ; Sun, 18 Aug 2013 08:10:58 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=x-gm-message-state:from:to:cc:subject:in-reply-to:references + :user-agent:date:message-id:mime-version:content-type; + bh=u/GYWwLsHZuczNJWDEDBBFVnAbo4umqzMppbGJGLOq8=; + b=Z+nkxBTdf3EvcvOcouYFq1VVNnzBiuAI/ncDL/hVRBXFHwM+B+qAvNOaaYrNIvwuZA + ATrX3p27GxL2S0UqtaqzD4+JGj5DARb/+WemVRrDNjt97lkKbORTuVH6DfV6NFyeay7x + /hcVqYBJc0Kuh9fYPlkJD2codbY9tTzBVkX8WJlOTLzPkXWW6XaEpaI3XLtD2HP0pkkZ + vVLBaopjRm3n+e1Hpxt1DHHv0PcfP1R/IfTjgBrTvBcnnMXnbw2tZrnAoo9HMKsKy8re + qTVYA+/Bb0YS/mGuXvU+KGcnJTQY3FNwhCDgZMUoWV7nflACarvqqBWnW2uCXDH0vPI/ + N9CQ== +X-Gm-Message-State: + ALoCoQnyIKis6vrTLuP8QMWlgXvBNl3GrxPQH/s/SL26u5pv0a1uYA6f3q5G3F8TV+5kHp7pBGAx +X-Received: by 10.204.62.132 with SMTP id x4mr4751621bkh.22.1376838656768; + Sun, 18 Aug 2013 08:10:56 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. + [88.195.111.91]) + by mx.google.com with ESMTPSA id w9sm945237bkn.12.1969.12.31.16.00.00 + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sun, 18 Aug 2013 08:10:55 -0700 (PDT) +From: Jani Nikula +To: Austin Clements , notmuch@notmuchmail.org +Subject: Re: [PATCH] test: Canonicalize RFC 2047 encoding and charset +In-Reply-To: <1376833926-6024-1-git-send-email-amdragon@mit.edu> +References: <1376833926-6024-1-git-send-email-amdragon@mit.edu> +User-Agent: Notmuch/0.15.2+227~g40b2846 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Sun, 18 Aug 2013 18:10:56 +0300 +Message-ID: <8738q7f30f.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain +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: Sun, 18 Aug 2013 15:11:09 -0000 + +On Sun, 18 Aug 2013, Austin Clements wrote: +> RFC 2047 states that the encoding and charset in an encoded word are +> case-insensitive, so force them to lower case in the reply test. This +> fixes an issue caused by GMime versions (somewhere between 2.6.10 and +> 2.6.16), which changed the capitalization of the encoding. + +LGTM, and this fixes id:8738q8jzh3.fsf@nikula.org with GMime 2.6.16. + +BR, +Jani. + + +> --- +> test/reply | 8 +++++--- +> 1 file changed, 5 insertions(+), 3 deletions(-) +> +> diff --git a/test/reply b/test/reply +> index d4389cf..a078927 100755 +> --- a/test/reply +> +++ b/test/reply +> @@ -201,12 +201,14 @@ add_message '[subject]="=?iso-8859-1?q?=e0=df=e7?="' \ +> '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ +> '[body]="Encoding"' +> +> -output=$(notmuch reply id:${gen_msg_id}) +> -# Note that GMime changes from Q- to B-encoding +> +# GMime happens to change from Q- to B-encoding. We canonicalize the +> +# case of the encoding and charset because different versions of GMime +> +# capitalize the encoding differently. +> +output=$(notmuch reply id:${gen_msg_id} | sed 's/=?[^?]*?[bB]?/\L&/g') +> test_expect_equal "$output" "\ +> From: Notmuch Test Suite +> Subject: Re: =?iso-8859-1?b?4N/n?= +> -To: =?UTF-8?b?4piD?= +> +To: =?utf-8?b?4piD?= +> In-Reply-To: <${gen_msg_id}> +> References: <${gen_msg_id}> +> +> -- +> 1.7.10.4 -- 2.26.2