Limits on number of interim responses in HTTP clients/proxies
Marius Kleidl <marius@transloadit.com> Tue, 16 January 2024 10:07 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 04EC3C14F6A7 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 16 Jan 2024 02:07:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.756
X-Spam-Level:
X-Spam-Status: No, score=-7.756 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, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, 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 (1024-bit key) header.d=transloadit.com
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 Gr1bsZaihNs9 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 16 Jan 2024 02:07:05 -0800 (PST)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (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 41AE5C14F609 for <httpbisa-archive-bis2Juki@ietf.org>; Tue, 16 Jan 2024 02:07:05 -0800 (PST)
Received: from lists by lyra.w3.org with local (Exim 4.94.2) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1rPgKA-004Paz-31 for ietf-http-wg-dist@listhub.w3.org; Tue, 16 Jan 2024 10:05:38 +0000
Resent-Date: Tue, 16 Jan 2024 10:05:38 +0000
Resent-Message-Id: <E1rPgKA-004Paz-31@lyra.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by lyra.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <marius@transloadit.com>) id 1rPgK8-004PYS-L9 for ietf-http-wg@listhub.w3.org; Tue, 16 Jan 2024 10:05:36 +0000
Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by mimas.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from <marius@transloadit.com>) id 1rPgK6-0014f4-5E for ietf-http-wg@w3.org; Tue, 16 Jan 2024 10:05:36 +0000
Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-50e7abe4be4so12871049e87.2 for <ietf-http-wg@w3.org>; Tue, 16 Jan 2024 02:05:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=transloadit.com; s=google; t=1705399529; x=1706004329; darn=w3.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=yH5WiFBZP59D/n+SinfFYp+aGuYjwNa1BN3NaX7DgO0=; b=YZ0LY0HKb49xdKD3F2pr1nKv3lT5eTYtX33GVafxEbW2XTrrTI4NB/qA/Sa96uDtnk 5SVtflJL+fSRIwnTjsOSrQf4vZ6QEjHzQHr6YD3UO988UaTB41XXBxr1IGJA87PZF7OM PX9dSnCV468GO1Dl5gUMjbiAszNQltp/ap+F4=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705399529; x=1706004329; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=yH5WiFBZP59D/n+SinfFYp+aGuYjwNa1BN3NaX7DgO0=; b=Vdy1tJYVwOKLjcZF6lgsLLYiCrn0Ki07L7HYEFvkINjeI+3etk70QJXXKkDnq1Kf4r A1Yf0hNJX7O2BXwjjeiOM2O9ceEuVc/O8NXZqr1/12pUuGG5O3Ygg6tLZHhNIJUkQSBk 09GRjazWp1RiaZeRvO8tOTFqniE+CKQwC7xaRNIvhPp/NX7fPxFm4F0ov5LIeSuSNs79 9kd71bCP77V4KJCl8jYu8GiohjLwSV28otZ9Lpbc1JcW6ww7ULaj4jUnT0YrRGlwEKn+ avzbHRAHmN2gC5G5xj2PWCpwnx7ZEdZK56cBTK2mhr/SCJ1Ie0w4LmFVObaPutpEKsPY jKAQ==
X-Gm-Message-State: AOJu0YxV/l+SVZZrN9hjkgf5J+UdUCLbQVKMLjw7bicH3VnSTG3m9euV buPRzMjNNdv+6Is4sprCW5+/n9UGz0JCxeTdkBrerZ67UVuNEYWNoTMLCHNopcdMuw==
X-Google-Smtp-Source: AGHT+IHVl7baBFdlEA8Dcsg8U0GlXwDkwDOJAsZo3oOufipG+OixCUjhLLu8ApIH6f4QRhu3hE3bMUmmvXRh4ZpJu88=
X-Received: by 2002:a2e:a48f:0:b0:2cc:788a:3d4d with SMTP id h15-20020a2ea48f000000b002cc788a3d4dmr3325956lji.51.1705399529445; Tue, 16 Jan 2024 02:05:29 -0800 (PST)
MIME-Version: 1.0
From: Marius Kleidl <marius@transloadit.com>
Date: Tue, 16 Jan 2024 11:05:18 +0100
Message-ID: <CANY19NtV-ynM4cC3o6tBg+k3tO2ediybbCyPa_J+f0jCYJO=Og@mail.gmail.com>
To: HTTP <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="000000000000272b22060f0d4544"
Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=marius@transloadit.com; helo=mail-lf1-x12d.google.com
X-W3C-Hub-DKIM-Status: validation passed: (address=marius@transloadit.com domain=transloadit.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1rPgK6-0014f4-5E 25265033f0a3035e291921d4ac603f93
X-Original-To: ietf-http-wg@w3.org
Subject: Limits on number of interim responses in HTTP clients/proxies
Archived-At: <https://www.w3.org/mid/CANY19NtV-ynM4cC3o6tBg+k3tO2ediybbCyPa_J+f0jCYJO=Og@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/51718
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>
Dear working group, the HTTP client in Go's standard library includes an (undocumented, as far as I know) limit on how many interim or final responses it will receive for a single requests. In general, the client handles interim responses well, but if more than 5 responses are received, the entire connection/stream is aborted. This also results in the final response being lost. More details on this hard-coded limit can be found at https://github.com/golang/go/issues/65035. While this is a limitation in Go's client and should be addressed there, it does raise two questions: 1. Is there a recommendation in any RFC to limit the number of received responses to avoid a certain type of attack or abuse pattern? I was not able to find such in RFC 9110 or 9112. 2. Do people know whether other clients or proxies implement a similar limit? Proxies should not interfere with interim responses AFAIK, but the reality might be different. It would be helpful to know if this limitation is common. A bit more on the background: As part of draft-ietf-httpbis-resumable-upload, we are considering allowing an endpoint to regularly send interim responses to update the client on the processing progress. Of course, this feature is contra-productive if the client aborts the connection after too many responses. In the past, HTTP endpoints usually didn't send many interim responses, so such limitations were not causing regular problems. I would be happy to hear if someone has more insights into this. Best regards Marius Kleidl
- Limits on number of interim responses in HTTP cli… Marius Kleidl
- Re: Limits on number of interim responses in HTTP… Roy T. Fielding