Comment on draft-ietf-httpbis-sfbis - lower case keys

Mitar <mmitar@gmail.com> Fri, 05 April 2024 11:01 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=ietf.org@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id EE0BFC14F618 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 5 Apr 2024 04:01:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.848
X-Spam-Level:
X-Spam-Status: No, score=-2.848 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=w3.org header.b="nHY8TIXc"; dkim=pass (2048-bit key) header.d=w3.org header.b="kukm9Hnv"; dkim=pass (2048-bit key) header.d=gmail.com header.b="KxlqRhDN"
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0RRGtxG2k5Az for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 5 Apr 2024 04:01:12 -0700 (PDT)
Received: from mab.w3.org (mab.w3.org [IPv6:2600:1f18:7d7a:2700:d091:4b25:8566:8113]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CD5C0C14F6B7 for <httpbisa-archive-bis2Juki@ietf.org>; Fri, 5 Apr 2024 04:01:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=Subject:Content-Type:To:Message-ID:Date:From:MIME-Version:Cc:Reply-To :In-Reply-To:References; bh=dVgTY9F5wOI2giRiqDULDuvz4DOJ/TAR9zTh7yKjrcY=; b=n HY8TIXcDHWIr/j7BjPTs+e18K5HHxNEOaRpaX6g8J0HN6TmTtHNsQ3z1+UbUoeDKwQcg31o8XLR8K XENq07IVlriDCHqV9nNE58kkji9LfRjEEo1vXMtyucUzyXzBfXgWiIOh1pRnIN9cK53it3dn3iLvu yPxbFXjsnDGf17O2n1LZRuSZk2w7EWIaISQ5JnSjQifvnEk771KkTV1ZXVRnZJI8ihwSeLCnt0h+T 7QXfVazYIA66ItfSxJcIDySyi+7ZxXD7fa2tr1HDlNNm9+0Q2Qjz/9IA7U9G5nx2Em/kitkMGjjF5 Cclnwp+KakHSl3jeGe02o2+vhgbEBnJag==;
Received: from lists by mab.w3.org with local (Exim 4.96) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1rshIf-006tWm-2z for ietf-http-wg-dist@listhub.w3.org; Fri, 05 Apr 2024 11:00:01 +0000
Resent-Date: Fri, 05 Apr 2024 11:00:01 +0000
Resent-Message-Id: <E1rshIf-006tWm-2z@mab.w3.org>
Received: from ip-10-0-0-144.ec2.internal ([10.0.0.144] helo=pan.w3.org) by mab.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from <mmitar@gmail.com>) id 1rshId-006tVX-1k for ietf-http-wg@listhub.w3.org; Fri, 05 Apr 2024 10:59:59 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=Content-Type:To:Subject:Message-ID:Date:From:MIME-Version:Cc:Reply-To :In-Reply-To:References; bh=dVgTY9F5wOI2giRiqDULDuvz4DOJ/TAR9zTh7yKjrcY=; t=1712314799; x=1713178799; b=kukm9HnvxUozyjKcb9Qqs/wFViyueCD91g73TUAx/pU05Ra jcejuD9gF8yzq2tlnJhxp4/3chPu/ezSjUK6sCxOUeojV0kK/CvfpinXUraKTdTbmO1hiwo7AOAOc ThBich1wIR+Ze1qJ/hBksIyjQf5QuL35skwvTV/urRy/7mP4CoXcoAzmj39G6vhpgGDrK5MQ36aYU cheUWQ3PG70FyxZhT5qNOomUc76IwrPHM0EIAkHnJmL9qGVw1krix3YCA4FYeSod0cyE3w2OX/P+7 3TK2yXdNlga6Yefsw4G7bZ+JZ2A7KYmA9lTJZgY+S7pZ5ST0Qh6jJ/zF3zFN1BAw==;
Received-SPF: pass (pan.w3.org: domain of gmail.com designates 2607:f8b0:4864:20::1134 as permitted sender) client-ip=2607:f8b0:4864:20::1134; envelope-from=mmitar@gmail.com; helo=mail-yw1-x1134.google.com;
Received: from mail-yw1-x1134.google.com ([2607:f8b0:4864:20::1134]) by pan.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from <mmitar@gmail.com>) id 1rshIc-006ces-1b for ietf-http-wg@w3.org; Fri, 05 Apr 2024 10:59:59 +0000
Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-6150c1fa3daso23513047b3.1 for <ietf-http-wg@w3.org>; Fri, 05 Apr 2024 03:59:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712314795; x=1712919595; darn=w3.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=dVgTY9F5wOI2giRiqDULDuvz4DOJ/TAR9zTh7yKjrcY=; b=KxlqRhDNENkoTEPSHA7bEOu9RDqQuX0iETZktkVbgiGuO+vrNtWDYgPmyWRi0bfou8 HBhHihpmSfssIOfuuI3KfSiWQEmacZcyKeaGsX6X8kLe93rK7n19PsE4/uAVCZ9tYKpi 2L6YVPX7DjLfShy3iOJ0LE0aJgxqxsGHhYyn3dMompHHPUAB8pKf33GY66PQ6IizCsBe 6v4rcZcpCMLbuJIzFuIaHNpp/aG3IPO0oVDu+VXCPJaTySAsYBOogIpNnSRgBG+Iq153 P9eqK1WySVW83GdPZVg5bLqS3OT9949711+92XvRpoBoxlEIJcNfxq0TFy1SIE1Ijgzw skfQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712314795; x=1712919595; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=dVgTY9F5wOI2giRiqDULDuvz4DOJ/TAR9zTh7yKjrcY=; b=OaGG//+DHHo6IguvzS9tbUFECqoAcCgvzfGltHY28qCFVhcouJPai946/lDYX68u+K EIQyFkWTRZ8MGdN5I/4u5C0ShjHlLfL+W6oyWukbsssLX/1gxsHYpB1oaSiP4wqJciAi HYa8HoDaDlEy3aiE6vxEZJxjKhrt9lnw3DKMW+fEZDegEjpg7pS4tqzdrPa7FdEMYkLk KBhoHgTUqB2FGhuW4RpswXO3lU8WKsPLmOhlJmpuqJrQ5w2CJv93LKSHX8fv1sQzsYB4 USM2Gwl6G7M2YroRte+kjln4fGyplD3m/XgjTpY4xIG/G5UzFzV4wEh25d/QqwZWnjNM DxpQ==
X-Gm-Message-State: AOJu0YyY5ko8xRFXVUqmNrTkqxde2iuBCvoyRXwZknSPSBrEfpsXutOh Pvp7j60N7V8HhHoZtDi8Es1V/zSgD/InWyrOWMQJ4Z/ckr8GmD8iwvWgbNLyu1Fh7x+qekUQ7uW eAg+mjk8hQOs8BIkZfLObqsGfJEMnCQytSdU=
X-Google-Smtp-Source: AGHT+IFSymCsX1k7OCC1cHyoAzT/nXOplI0ddTPsseRAwU4hB7OK2UDbsPcgg3m+cyqbD5bdfgl5+oZmTCUBWSJfTg0=
X-Received: by 2002:a05:6902:70d:b0:dcc:6112:f90d with SMTP id k13-20020a056902070d00b00dcc6112f90dmr901664ybt.62.1712314794860; Fri, 05 Apr 2024 03:59:54 -0700 (PDT)
MIME-Version: 1.0
From: Mitar <mmitar@gmail.com>
Date: Fri, 05 Apr 2024 12:59:43 +0200
Message-ID: <CAKLmikMuLR4wtQ3MOX13bi37c3xOStDobdSQBbv-dh33yZ4MFg@mail.gmail.com>
To: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
X-W3C-Hub-DKIM-Status: validation passed: (address=mmitar@gmail.com domain=gmail.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-4.1
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, DMARC_PASS=-0.001, FREEMAIL_FROM=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: pan.w3.org 1rshIc-006ces-1b 9bbaea687d47bfe5a4f3d4c55b30e544
X-Original-To: ietf-http-wg@w3.org
Subject: Comment on draft-ietf-httpbis-sfbis - lower case keys
Archived-At: <https://www.w3.org/mid/CAKLmikMuLR4wtQ3MOX13bi37c3xOStDobdSQBbv-dh33yZ4MFg@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/51919
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/email/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

Hi!

I know I am late in the draft-ietf-httpbis-sfbis process, but after
using for some time now both RFC 8941 and sfbis extensions, I wanted
to share my experience. I really like it, It is great to have a
standard way to pass values in headers to clients. It is great that it
is compatible with how most other standards are doing it. It is great
that it is typed.

But ... the requirement that keys should be only lower case (section
4.1.1.3) really makes it hard to be interoperable with existing ways
to encode data structures. It makes it tricky to write idiomatic data
structures in many languages which use camelCase and then convert that
structure into structured field values. For example, if you want
idiomatic JavaScript objects on both server side (where you are
sending the header) and client side (where you are reading it), you
have to encode it as snake_case or something. Or ask all users
creating the data structure to use snake_case to begin with. But in my
app I want to pass some metadata to the client and I want the app
itself to decide which fields go into JSON response and which fields
into HTTP header. There is unnecessary friction here.

I would really urge that this is relaxed in one of future versions and
upper case ASCII to be allowed as well. I know that this is primarily
cosmetic, but it would make different languages and libraries easier
to work together.

I understand that there are probably strong reasons for this decision
and that this has probably been discussed already, but I just wanted
to share my experiences with in my view unnecessary friction.

Thank you for great work on the sfbis,


Mitar

-- 
https://mitar.tnode.com/
https://twitter.com/mitar_m
https://noc.social/@mitar