From patchwork Wed Feb 19 13:27:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Edmondson X-Patchwork-Id: 11391455 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F01E61580 for ; Wed, 19 Feb 2020 13:28:44 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C5E0424654 for ; Wed, 19 Feb 2020 13:28:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="vBACIPUu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5E0424654 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:52592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4PPA-0007WY-12 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 19 Feb 2020 08:28:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38922) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4POR-0006N9-Dp for qemu-devel@nongnu.org; Wed, 19 Feb 2020 08:28:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j4POQ-0004sC-EO for qemu-devel@nongnu.org; Wed, 19 Feb 2020 08:27:59 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:47512) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j4POO-0004qY-1E; Wed, 19 Feb 2020 08:27:56 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01JDIoC0014901; Wed, 19 Feb 2020 13:27:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2020-01-29; bh=mLkgPKn3ZKa1Jo6/uTrEOXhPq8Yzk/REN5XmUuJecCo=; b=vBACIPUu5bHu0T6LlxxZMZMCrUliHvnsjSnb7WImrjq87mu833NGzjZNNPzlXSZWfLTq Ycorj8cPP3meu/FvisZUow59KBH8dmIqz9I/Mxz9/q++kLsx/8klFavo1asohaRrvF/q IMf0PXNSSuyrtYN92JSP+JZBKxgLLnMqHVkKebDsacVq/x4MosSy19I59+9sSZkJ0TuR bWA2fVSt6tYkjtIPDBnOBIVJGTHf9RE9rx1YzT2NRX2t6NrxPhRKWPaUW9Zw5x3T+cmq gmJe1nxuchEySYYl9quJMC93U2FLxMTNRvPk8qNAbYqWzuAhRctjK5V9XmbWHTliRF0x hg== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 2y8udd2y7a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Feb 2020 13:27:54 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01JDRrFV175635; Wed, 19 Feb 2020 13:27:53 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3020.oracle.com with ESMTP id 2y8ud5eaan-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 19 Feb 2020 13:27:53 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 01JDRlaR030415; Wed, 19 Feb 2020 13:27:48 GMT Received: from disaster-area.hh.sledj.net (/81.149.164.25) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 19 Feb 2020 05:27:47 -0800 Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id b4fb02b6; Wed, 19 Feb 2020 13:27:45 +0000 (UTC) From: David Edmondson To: qemu-devel@nongnu.org Subject: [PATCH 0/2] block/curl: Improve HTTP header parsing Date: Wed, 19 Feb 2020 13:27:42 +0000 Message-Id: <20200219132745.315381-1-david.edmondson@oracle.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9535 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=633 phishscore=0 suspectscore=1 mlxscore=0 malwarescore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002190103 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9535 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 impostorscore=0 mlxlogscore=695 malwarescore=0 mlxscore=0 suspectscore=1 priorityscore=1501 bulkscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002190102 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.86 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , David Edmondson , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" An HTTP object store of my acquaintance returns "accept-ranges: bytes" (all lower case) as a header, causing the QEMU curl backend to refuse to talk to it. RFC 7230 says that HTTP headers are case insensitive, so update the curl backend accordingly. At the same time, allow for arbitrary white space around the HTTP header field value, as required by the RFC. David Edmondson (2): block/curl: HTTP header fields allow whitespace around values block/curl: HTTP header field names are case insensitive block/curl.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-)