Re: Call for Adoption: SEARCH method

Asbjørn Ulsberg <asbjorn@ulsberg.no> Fri, 27 November 2020 13:28 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@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 1E1963A0BD7 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 27 Nov 2020 05:28:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.771
X-Spam-Level:
X-Spam-Status: No, score=-2.771 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=ulsberg.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 Yc6QlqyoPQNC for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 27 Nov 2020 05:28:18 -0800 (PST)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (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 539483A0BBE for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 27 Nov 2020 05:28:17 -0800 (PST)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1kidkj-00074U-01 for ietf-http-wg-dist@listhub.w3.org; Fri, 27 Nov 2020 13:25:33 +0000
Resent-Date: Fri, 27 Nov 2020 13:25:33 +0000
Resent-Message-Id: <E1kidkj-00074U-01@lyra.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <asbjorn@ulsberg.no>) id 1kidkh-00073j-S0 for ietf-http-wg@listhub.w3.org; Fri, 27 Nov 2020 13:25:31 +0000
Received: from mail-qk1-x730.google.com ([2607:f8b0:4864:20::730]) by titan.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <asbjorn@ulsberg.no>) id 1kidkf-0000qU-QD for ietf-http-wg@w3.org; Fri, 27 Nov 2020 13:25:31 +0000
Received: by mail-qk1-x730.google.com with SMTP id q22so4285617qkq.6 for <ietf-http-wg@w3.org>; Fri, 27 Nov 2020 05:25:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ulsberg.no; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=TMTY6yKGGJOWAJOUSZO5oEsxxHSMDbvtzseuPSoI/88=; b=EG6e2Y75TsHmcizk8xNvDfD3aR0fQC7yjz0K2AiAwFAff1OIhL1TKG+2atL0dNLtXs Xz8H2Ue8ch11OedU1bKnzIUFTNm0I9RGeRQ6hHWqSq3OpuqkS3K3XhMLB487wnKXWaDu NoKfksLfD+4Xz3/k0xOSzI5HxkBrc9blxS9tDnnmNj9z8fz/U5qGkl3sMW0ah3iPh0bF M8EVm22VMMD2KOD6prGLcoaPAl77VikUfNcKud215UHH+Jxbf6epgu5T9V3cWSimd+1B yGmyibjLWuJ8xG5y3C0oGydsobNzv65IfrAN3TMdXSrNwPagOQxzhmI4S+y3mYdAiCcF i+Bw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=TMTY6yKGGJOWAJOUSZO5oEsxxHSMDbvtzseuPSoI/88=; b=LdM1ewNGx53RIoPnNDpcnBN9PfpSjYJQ/OOhxXn4CA40kE2Yq+T/t/ObB0T2d+kdQ+ PMXf53m1F0Kf9+G/WUPNQ4xpSbZXc4GFId6GSWtWadv1+R5/lN/k37R8tXE3p7JhDhZU kAmRb+bUioDnkzhX2y8lCR3PV2F11HNkEhAhDsAQD/VLhu3elspo1W9cI296hIt89tER YpZ7WfBs7yAl6aMGParHYWEXEc4fQFtDsAYSICFg9pGjzgFnoGhAKs1sdEdyhnbKtKir JJxKfyOWje0ucwfSQWG3vGxjXT+M1VhOyZo+NUaapD/aDC4wPB0qqlTYgrQfLuhiZRog riCA==
X-Gm-Message-State: AOAM5309+3KhaeiCC7UnpAJ7l7OOx7K9fwgA0+pJ0resYw/7zTiqyczf CT5qCQnatUGY9mEbQnOFyTZLFXwSuBrtEWL4
X-Google-Smtp-Source: ABdhPJx6oFKZb7BMawuBL3rE6Fu8zxoF1l2iJrJlGnNWL8uHDbNXwG0DdLttZnrZgy78qpKFALQPDw==
X-Received: by 2002:a05:620a:80d:: with SMTP id s13mr8353756qks.133.1606483518164; Fri, 27 Nov 2020 05:25:18 -0800 (PST)
Received: from mail-yb1-f179.google.com (mail-yb1-f179.google.com. [209.85.219.179]) by smtp.gmail.com with ESMTPSA id n125sm5863169qkd.85.2020.11.27.05.25.17 for <ietf-http-wg@w3.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Nov 2020 05:25:17 -0800 (PST)
Received: by mail-yb1-f179.google.com with SMTP id x17so4532210ybr.8 for <ietf-http-wg@w3.org>; Fri, 27 Nov 2020 05:25:17 -0800 (PST)
X-Received: by 2002:a25:c68c:: with SMTP id k134mr13562049ybf.451.1606483516796; Fri, 27 Nov 2020 05:25:16 -0800 (PST)
MIME-Version: 1.0
References: <F0556EC2-D5AD-47FF-A780-15949F57A911@mnot.net> <5C86F8CE-3075-48C7-BFA0-B7E202225829@acm.org> <CABP7RbeA8mj=sQhRFx6cUnnGES9=fogy=94nWwWkuQDj2NBNfA@mail.gmail.com> <00838246-acb5-6ad3-5864-9cce8521d9ca@gmx.de> <CAAPGdfFVaiQduehRvX8e0jeKr6LV06cM5UCPmBxyNr1xkNEbjQ@mail.gmail.com> <CAEaz5mtYOuEHJyP9H4HD8VyRR5Wj8GkHaYws1iGFFoH3_3vh9w@mail.gmail.com>
In-Reply-To: <CAEaz5mtYOuEHJyP9H4HD8VyRR5Wj8GkHaYws1iGFFoH3_3vh9w@mail.gmail.com>
From: Asbjørn Ulsberg <asbjorn@ulsberg.no>
Date: Fri, 27 Nov 2020 14:25:05 +0100
X-Gmail-Original-Message-ID: <CAEdRHi42CFu1EFTPTSzpBOiz4_aVhSXTE=92mGkWrkB3yJSVyQ@mail.gmail.com>
Message-ID: <CAEdRHi42CFu1EFTPTSzpBOiz4_aVhSXTE=92mGkWrkB3yJSVyQ@mail.gmail.com>
To: James Fuller <jim@webcomposite.com>
Cc: Greg Wilkins <gregw@webtide.com>, Julian Reschke <julian.reschke@gmx.de>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=2607:f8b0:4864:20::730; envelope-from=asbjorn@ulsberg.no; helo=mail-qk1-x730.google.com
X-W3C-Hub-Spam-Status: No, score=-6.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1kidkf-0000qU-QD ab472bb49ef7466544b1c7912e2fe291
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Call for Adoption: SEARCH method
Archived-At: <https://www.w3.org/mid/CAEdRHi42CFu1EFTPTSzpBOiz4_aVhSXTE=92mGkWrkB3yJSVyQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/38257
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/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

tor. 19. nov. 2020 kl. 08:01 skrev James Fuller <jim@webcomposite.com>:

> it would help clarify what exactly s being proposed, as the potential
> for developer confusion is high (because we all know what SEARCH
> must mean, right ?).

I agree. When I first brought this to the WG's attention, it was based
on discussions around the use of GET with payload, which is both wrong
and dangerous:

https://github.com/elastic/elasticsearch/issues/16024

In my view, SEARCH as currently specified only solves the first of
five desirable properties of a new HTTP method:

1. Explicit support for a request payload.
2. Safe.
3. Idempotent.
4. Cacheable by default (keyed by payload).
5. Content-Type agnostic.

Not attempting to solve any of the other properties is a missed
opportunity, imho. I would support and implement the method
regardless, but I would be much more in favor if we managed to give
the method all of the five properties mentioned above.

Wrt. cacheable by default, we may also consider a general HTTP header
that can also be applied to POST, as suggested here:

https://github.com/httpwg/http-extensions/issues/942

> * does SEARCH naturally assume working on collection of resources (uri's) ?

Not any more than GET with a query string?

> * if we are not constraining result format (or content type eg. return
> a text/uri-list) then what is different from a
> GET with some meta data saying 'this is a search' ?

The result of a SEARCH request should not impose any semantics on the
response, imho. The semantics of the response is conveyed by its
Content-Type, which the client can of course negotiate with the Accept
header. Each item in the SEARCH result is not necessarily its own HTTP
resource, although something like that would be possible with a multipart/*
response Content-Type.

-- 
Asbjørn Ulsberg           -=|=-        asbjorn@ulsberg.no
«He's a loathsome offensive brute, yet I can't look away»