Re: [art] Updates to RFC4180 - CSV

Stian Soiland-Reyes <soiland-reyes@manchester.ac.uk> Thu, 01 April 2021 09:45 UTC

Return-Path: <soiland-reyes@manchester.ac.uk>
X-Original-To: art@ietfa.amsl.com
Delivered-To: art@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 848F23A12B3 for <art@ietfa.amsl.com>; Thu, 1 Apr 2021 02:45:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TrI_OYCPx_zQ for <art@ietfa.amsl.com>; Thu, 1 Apr 2021 02:45:41 -0700 (PDT)
Received: from GBR01-LO2-obe.outbound.protection.outlook.com (mail-eopbgr100042.outbound.protection.outlook.com [40.107.10.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BF66F3A12B2 for <art@ietf.org>; Thu, 1 Apr 2021 02:45:39 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LM62NqlNPe+TwZeWKRkotACh1SbAedFRqLQNkxHzwBkJkawuWbtRD5Mi2Lf/cIRMMG2yLfleGQLPXOQkyvss3WDn4dgdYmayWONLFB5j0j6Sa27m62+tsbg9ju5TwJZ3IEPLulT9iLGPmjv63ayHM2OkvfX0mfuKJ9c982lsYclpUWQOaQzggS8/jdJgCoTN7mj8yMwtuzi9y2bpGXSn5nwWujm3jrYX45/bpIZ5r7d4u986qfNRd9ZVeZtOjHTwiQYpac9EJixs52VOHxwtmZ7iLRssQtlXw3jWe5wtBQiLDqGDqvmMUb5tWISe/SpynQre3F71zTay1bTW5bsiJQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eKys3d1B3m9mop7+AZXBBHfX385HX2Xn8vImA+F3I8o=; b=SW8ZHIxuaAs3V83yjY343aeE9IKT2rDcjhOfm6rTdehsou51Q0QSjLmyvKBWK+gZbdRZzpqZZrBk9aaPFCIFBJ2mAU9Xv9i8MaddFKiq5FHCfPulS3AWRDLIpcZwSY5xVP2C/9ZG1/2Nxd6vI42xkvpqMhaAp5VORt+K7O6CJR9ExW+PGuzCDkCVSfed0FJOzKBlbAnywCM4ex4QnfUMlSP79g6iUgkyBFWVHsa8j9aHhCxOT+PjqVgadLdHwU+v7bdtovHK8kjjeXg7dDo9D/swZn0pcE5OmFkZZvs9BcSPOCOIs8aNQVe639B6vkanw1Y5zDrU6qprqnfSP+V0cQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=manchester.ac.uk; dmarc=pass action=none header.from=manchester.ac.uk; dkim=pass header.d=manchester.ac.uk; arc=none
Received: from LO0P265MB2986.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:184::9) by LO0P265MB3050.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:185::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.33; Thu, 1 Apr 2021 09:45:37 +0000
Received: from LO0P265MB2986.GBRP265.PROD.OUTLOOK.COM ([fe80::8088:4602:d179:2e9e]) by LO0P265MB2986.GBRP265.PROD.OUTLOOK.COM ([fe80::8088:4602:d179:2e9e%7]) with mapi id 15.20.3977.033; Thu, 1 Apr 2021 09:45:37 +0000
From: Stian Soiland-Reyes <soiland-reyes@manchester.ac.uk>
To: Yakov Shafranovich <yakov@nightwatchcybersecurity.com>, Julian Reschke <julian.reschke@gmx.de>
CC: "art@ietf.org" <art@ietf.org>
Thread-Topic: [art] Updates to RFC4180 - CSV
Thread-Index: AQHXIlv+ELmHouNkYUCBFEubmQwgCKqWe80AgABPyICACLf+AA==
Date: Thu, 01 Apr 2021 09:45:37 +0000
Message-ID: <5B07B14E-9437-4462-9F2A-5F7A9FF22838@manchester.ac.uk>
References: <161676270417.32504.3146748323978646638@ietfa.amsl.com> <CAAyEnSM8u-tv=DFWXay46Ep1us9tz42uigd859kW8BYK_WP57A@mail.gmail.com> <1a013397-2fce-85ab-8a77-59e87518b5f0@gmx.de> <CAAyEnSO4V4hNh=uRhTrHw+9QJHNs6cgJUG7-TsmORfaMtOeH6g@mail.gmail.com>
In-Reply-To: <CAAyEnSO4V4hNh=uRhTrHw+9QJHNs6cgJUG7-TsmORfaMtOeH6g@mail.gmail.com>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/16.43.20110804
authentication-results: nightwatchcybersecurity.com; dkim=none (message not signed) header.d=none;nightwatchcybersecurity.com; dmarc=none action=none header.from=manchester.ac.uk;
x-originating-ip: [2001:8b0:a657:68e5:719e:d415:70b1:490c]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 1f234585-6702-4c53-f73a-08d8f4f2e772
x-ms-traffictypediagnostic: LO0P265MB3050:
x-microsoft-antispam-prvs: <LO0P265MB3050EA69D7E152E28AEBC9A0DD7B9@LO0P265MB3050.GBRP265.PROD.OUTLOOK.COM>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: Y4IbMK8G4C0Qq9XIuQ5qtvWRtCNkkM2fNtvOCgbCJD0j1FssamH+jiyESUgFqIPCfEeqtJSVWcXbcRl5b2ixnnUeDV0aHnXlcHoJe2RvQoXwjZNdICXpXi2YVZQN3o9DjYdR5S5L2vG/2koyGBBPG2eCvkIqFhLh3WTvNHjxUlDefFhzgOwtXVNuYxvVU2vo5+xpIBaCs5m626VAZSOTovTByZTDdtw7KBsdLLVW6k7xyU9+0qONw2T/lf5ubQ6WPiv0FqF24qX6Js8GUlNFf6A1XT81Ku51uCPk0tiVjvHN2j+TRzolVj8dJDbfHQkGZ0AfBIhLPRZ09A5N6ZUzFuaDLzykUNIt4axkexod/Rg8VE5sJggpDvLZRLGfcwUTdr+2xVtwydZ8UFFgZWWbN7ty+PlhrFGUSeE4wxRkn4mg9solP0gsUnoTLGw9y/YGiG9Ha77u8zeSwF8WH5/UAPb5BPSwfgCqTOYC9uF/6CIyCKKWwzzRI+wFVd7DFitDDNic7DZuPpj00pJUnPm4eYzXEZJ4HmNu444g/p0povaMrk6fi1hhUZ9PdO6aX3ImJ9fiiltTIrvjIdzTWgWwS7k0fEJBo87ULRf8001ysGQipv6JmCeDZqD46BdrD3dGL+CDH4OSe59puu2TJlbaMmAgUMVa7op3ml3HF4HqMCiXCIYvSJgGNdRaAjbuXs+H8Flja5frfVRqZwQ054p9+hyPh+OdWOhPWV4SpnMb7cuic8oQ/A8SCpDKbAtywFfIcCkW699bvg69AetbWCd8nQ==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:LO0P265MB2986.GBRP265.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(4636009)(366004)(376002)(136003)(396003)(346002)(39860400002)(8676002)(966005)(186003)(8936002)(66446008)(71200400001)(110136005)(15650500001)(66476007)(53546011)(36756003)(2616005)(86362001)(66556008)(4326008)(83380400001)(6506007)(6486002)(33656002)(5660300002)(6512007)(38100700001)(76116006)(64756008)(316002)(2906002)(478600001)(786003)(66946007)(45980500001); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: nlnqIXyFmZe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3heWxbMR382ieNnsja4TFUrECU0h+YSe7aEV5sZ9amucJ+/ZZ+Q84oT/hoEpMrtMbPFZSnZxC9hoRqP9FwUjo42h9nV0usjsaJSzAIAXp5iGM5tRemlWLc6GJP5+W5vI/nRwJOTCZQHaobpEusNXe0gwdKvmzviSTjKgYPD5jHz2Vu9FqKYsFaR9+Qkp2mDXZBpRFKfCn+/MAmctWuKcsxCKr+vIg8ZW9mBtvXa964sLZ4jjRIMBlQ+QzPtT9trV/4alqKzKRy42+j+FHkcToAvvBhRHtYdM1oWmUmS9G4DQEDR1WVwwvQ0Fe1rRg6LQJq1PG+E5r/A==
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <B1C633A8F0F11E4DA901B48B19961F9D@GBRP265.PROD.OUTLOOK.COM>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: manchester.ac.uk
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: LO0P265MB2986.GBRP265.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-Network-Message-Id: 1f234585-6702-4c53-f73a-08d8f4f2e772
X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Apr 2021 09:45:37.3457 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: c152cb07-614e-4abb-818a-f035cfa91a77
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: W1FNcQyXVhW4V8ZPqEoGVN+JqVaWFGnbVnb/Ee26TlMsINqf23TdlmoOVlqvhNcTvERmglsz4eSNkOkQUr59GPkOKAoH+6i+JyAxz2fCong=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: LO0P265MB3050
Archived-At: <https://mailarchive.ietf.org/arch/msg/art/kUnJ1niZK8pndqCYVG9GykmGHsI>
Subject: Re: [art] Updates to RFC4180 - CSV
X-BeenThere: art@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Applications and Real-Time Area Discussion <art.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/art>, <mailto:art-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/art/>
List-Post: <mailto:art@ietf.org>
List-Help: <mailto:art-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/art>, <mailto:art-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 01 Apr 2021 09:45:47 -0000

Thank you Yakov for this suggested update.

As you pointed out in GitHub https://github.com/nightwatchcybersecurity/rfc4180-bis/issues/24 , RFC7111 is relevant, and it should be referenced from here for the fragment identifier part of the MIME Type Registration. 


Have you got any suggestions for profiles for CSV files? 

This RFC gives a narrow, precise definition for one way to make CSVs, which is very useful ; but we know there are multiple lower-case "csv" files, which may use different separators for instance. See Python's CSV module's list of CSV dialects and options https://docs.python.org/3/library/csv.html#csv-fmt-params 

A webserver determining mime type using file extension has no way to know that the file is conforming to this RFC or not, but may still want to serve it as text/csv instead of application/octet-stream as it's likely to be understood by more permissive CSV parsers.

On the other hand, a server generating a conforming CSV may want to indicate this, perhaps as:

Content-Type: text/csv; profile="https://www.rfc-editor.org/rfc/rfcTODO#ABNF"

(using the new RFC number of course)


In 2.1.3 you still add one variation allowing two effective rfc4180-bis dialects:

   3.  The first record in the file MAY be an optional header with the
       same format as normal records.

But previously in RFC4180 this presence was recordable with the optional "header" parameter. What is the argument of removing this? 

If desired, this change should be justified within the text.


I would argue today, following RFC6906, this precision would be better achieved with the optional "profile" parameter.

Content-Type: text/csv; profile="https://www.rfc-editor.org/rfc/rfcTODO#ABNF https://www.rfc-editor.org/rfc/rfcTODO#header"

Content-Type: text/csv; profile="https://www.rfc-editor.org/rfc/rfcTODO#ABNF https://www.rfc-editor.org/rfc/rfcTODO#noheader"

Note: "profile" is white-spaced, so here we indicate both that we have a header (or no header), in addition the intention to actually follow the ABNF of this RFC.  This allows someone to say they have a header even if they break the ABNF (or have not checked).



Unlocking the "profile" parameter would also allow third-parties to use it to indicate their own dialects, for instance https://docs.python.org/3/library/csv.html#csv.unix_dialect would be a perfectly valid profile.


-- 
Stian Soiland-Reyes, The University of Manchester
https://www.esciencelab.org.uk/
https://orcid.org/0000-0001-9842-9718
    Please note that I may work flexibly – whilst it suits me to email now, 
    I do not expect a response or action outside of your own working hours.
 

On 2021-03-26, 21:38, "art on behalf of Yakov Shafranovich" <art-bounces@ietf.org on behalf of yakov@nightwatchcybersecurity.com> wrote:

    On Fri, Mar 26, 2021 at 12:51 PM Julian Reschke <julian.reschke@gmx.de> wrote:
    >
    > Am 26.03.2021 um 17:19 schrieb Yakov Shafranovich:
    > > Hi,
    > >
    > > Since this RFC was published in 2005, there have been multiple
    > > suggestions and recommendations for updates. After being prompted by
    > > Oliver Siegmar, and talking to Barry Lieba, I have been working on a
    > > new draft with Oliver's help and just published the -00 version:
    > > https://tools.ietf.org/html/draft-shafranovich-rfc4180-bis-00
    > >
    > > There is also a GitHub repo here:
    > > https://github.com/nightwatchcybersecurity/rfc4180-bis
    > >
    > > Comments and suggestions are welcome.
    > >
    > > Thanks
    > > ...
    >
    > You may want to check <https://www.w3.org/2013/csvw/wiki/Main_Page> for
    > potential overlap...
    >

    Thank you, I was actually a participant in that W3C effort. The intent
    of that WG was much bigger than my RFC and draft - they wanted to come
    up with a metadata format to describe CSV files. My draft is somewhat
    more limited to the CSV format itself and its associated MIME type.

    Yakov

    _______________________________________________
    art mailing list
    art@ietf.org
    https://www.ietf.org/mailman/listinfo/art