From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51B80C35646 for ; Fri, 21 Feb 2020 16:34:07 +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 1B45A20578 for ; Fri, 21 Feb 2020 16:34:07 +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="sefo+oHk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B45A20578 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+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:32820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5BFe-0002y6-71 for qemu-devel@archiver.kernel.org; Fri, 21 Feb 2020 11:34:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49444) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5BER-00013m-Sx for qemu-devel@nongnu.org; Fri, 21 Feb 2020 11:32:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j5BEQ-0000NQ-QE for qemu-devel@nongnu.org; Fri, 21 Feb 2020 11:32:51 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:35738) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j5BEN-0000Ku-Vo; Fri, 21 Feb 2020 11:32:48 -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 01LGV8qP024374; Fri, 21 Feb 2020 16:32:43 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=2MzMi46/tMJi+rQ/nsvPFHejON11ccmxncORRhmLF5c=; b=sefo+oHkSef9RpBdqxZ2AqWMKfrtZyocpWWSNpy19bY3Jq6CGqddFBym5R3jh3vhPnkZ f0G78C2p4MOnf086B6NZSjX7dJ6UOe+Dexv/C4riHR6oCt9AEaD7SZ1709iX2iDLOFd+ gKe5hrDjlKjT2udMotDeUnxoQGx0wP36FPRPb6rJthYIic36pJkiDIrVSSMwLdmc2mfR dU8/OxbJUQcAHmw0GGQoK0SlVSNvcku0MbTi2pGp7adjbZtF3E3CBZL6xih46ZdAPs4s bPpWwt3Ooag3zHZVVfcn/v1soIHvT0AyiUm8CdxLEjjTKxSJj2XXdmCfiR05hU5F7x1R tQ== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 2y8uddhm1g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 21 Feb 2020 16:32:43 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01LGVtbJ122918; Fri, 21 Feb 2020 16:32:42 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 2y8ud95724-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 21 Feb 2020 16:32:42 +0000 Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 01LGWf5r002398; Fri, 21 Feb 2020 16:32:42 GMT Received: from disaster-area.hh.sledj.net (/81.187.26.238) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 21 Feb 2020 08:32:41 -0800 Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 7be09f15; Fri, 21 Feb 2020 16:32:39 +0000 (UTC) From: David Edmondson To: qemu-devel@nongnu.org Subject: [PATCH v2 0/2] block/curl: Improve HTTP header parsing Date: Fri, 21 Feb 2020 16:32:36 +0000 Message-Id: <20200221163238.60688-1-david.edmondson@oracle.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9538 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=595 mlxscore=0 adultscore=0 spamscore=0 suspectscore=1 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002210124 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9538 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 impostorscore=0 mlxlogscore=654 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-2002210123 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+qemu-devel=archiver.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. v2: - strncasecmp -> g_ascii_strncasecmp (Philippe). - isspace -> g_ascii_isspace, for good measure. 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(-) -- 2.24.1