Message ID | 20230428193802.38596-1-christian.storm@siemens.com |
---|---|
State | Changes Requested |
Delegated to: | Stefano Babic |
Headers | show
Return-Path: <swupdate+bncBDD6BWV65QPBBUOAWCRAMGQE4XWIB6Y@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::639; helo=mail-ej1-x639.google.com; envelope-from=swupdate+bncbdd6bwv65qpbbuoawcramgqe4xwib6y@googlegroups.com; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20221208 header.b=ls/aZ09x; dkim-atps=neutral Received: from mail-ej1-x639.google.com (mail-ej1-x639.google.com [IPv6:2a00:1450:4864:20::639]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q7NCX4Qd3z23tZ for <incoming@patchwork.ozlabs.org>; Sat, 29 Apr 2023 05:36:54 +1000 (AEST) Received: by mail-ej1-x639.google.com with SMTP id a640c23a62f3a-9532170e883sf21976866b.3 for <incoming@patchwork.ozlabs.org>; Fri, 28 Apr 2023 12:36:54 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1682710610; cv=pass; d=google.com; s=arc-20160816; b=R35ocHFBjEM10NqW4jCcLMB6LsibAW0tf2e84mY7WllNrhGAFt5SFRu3oF3FGnbZwj XQUq96b7j1gsKskq/5/fMAwURfFZ6WGhORa0FVA5lHYFD5doy9f1ZMvRd5rDlNPYirzP lpirIEqDBEUW3AHxn5Z13exB9XSUsxpakGEk/Ho7BdYECDyF08J9G2z2YMiTiMfBIc3O Vab9spQagpEZ3DZBasC4OLmw72mJ+8gpXaFV7U1oh6jXuutNXU6jr/q8rWYkpvlxBtUq ZySySbPGQ6pBO0amTc6H1TP1JRUJsXL2asiGA0kTQNLpWNDywQq+d1dI6ddqGvNxs4mx sG+Q== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version:message-id :date:subject:cc:to:from:dkim-signature; bh=OGK5IXCrgidmnFr7VxcSR6SA2LRfZYGJ2xC7+oRXKCE=; b=d3DNzWjPbMbEUoo9aBuY/8sESOdNUFzyOs37/kl7Urssc0x8zKDQ+yO3IrUnxMRY9v /3NY0jSG+Izh0H/Ir8WaQvy9qr0cLIoR5S8uU7qXT1nwLm/7GObY6qdm/MprWJe2b8XS uxdQ3Pvmyl1Og6F98yx97eBbLdlQnGA14MTeN3DzgUxDaCDtYUV5QzkOmIkJpRdSE16l AdbUvNF/XkLwCGXjgI5rukLuEJgsAQCDHRVKvJC8ITeTEfVmez4bqz/SlDNbRp+hFlFM mLP5j4zb4APG/VXTGUyJPdW6fasKN6C4y/wUUK6jrFL8udw1bVKvY01Isau/2tzEvhsi 8QoQ== ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=Q2dQQiez; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 2a01:111:f400:7e1a::61e as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1682710610; x=1685302610; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OGK5IXCrgidmnFr7VxcSR6SA2LRfZYGJ2xC7+oRXKCE=; b=ls/aZ09xJHxDcww8Hy392yPLkBleLCQiKwicvxWE/xcS8m1jfocE0CTlpzMspwybh0 S8SWL/kYmk9z/K9ZOvcKq8NWJrJUbVS0HnRdUoNN/OpQgit8PnqLNw44cDZD9pNg1V3p mERAf3xAbKPNdNT2eufnhSWYcK2yEj6nTd+q6S5hs8Ab8ZbuCuGsZOiis8qyaK9hE+zG K1YIVOqVECL19AswOI/MHshaNHLJ2z8k5AZo9Png/tIqS9SFdEJqXbpDSjta37unSPmt QVEpv3vgpT27gD5y/5dTp6Hu1w/I7rxQ++zw1UgZuJkFeLpWxCu0Ahj4DFs6JTQp3qGN iYwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682710610; x=1685302610; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=OGK5IXCrgidmnFr7VxcSR6SA2LRfZYGJ2xC7+oRXKCE=; b=aOrZAcy5s2wgKF0//VnonQy3BCIOJhCkRTJmIKVGZ4u1QrrVA/pyS9zDpY5Uon82CG nZoOOCglQIPizhJ9mks50nbouL8RydFmtHUvT8+V7nHd8pwv/Em7mFAknTx0oZJ1UJOb i94XNtLNS7NFlXX5rcWa1H0D1yzDfZMcVLUeLwdKzWjORE5ovpSj5VI5vFSU/iHyc6dJ bLAEHLEpjSo8dSlMveTqF7KgeEdiSWl2sv3f1AVWKNtbKqU/6xzT6tgaY4u+peWPC5ej Vtp1F2tFYIIpLbvZ9m13to/byubTIIQ5A21eIHI/o+GR1N8Nr3D9AVEXsCcFbaKhQsYf cPmw== X-Gm-Message-State: AC+VfDxoQlUD1+lV7Mbk9LKj6U9p7UVm7sY7aRXdKPHPKONPiF0eZTzg gvVsud/e+oLL7eRONQbeURgBdA== X-Google-Smtp-Source: ACHHUZ6etTiP3XLVSRaPPd1Rb9FujOOUanPR8DP3JWbf6t9cMIj9/BtArAAQeY0cL/Pt2700vulWLA== X-Received: by 2002:a17:907:1dd7:b0:92f:cbfe:1635 with SMTP id og23-20020a1709071dd700b0092fcbfe1635mr2552776ejc.6.1682710609760; Fri, 28 Apr 2023 12:36:49 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6402:3719:b0:506:6a9d:2db4 with SMTP id ek25-20020a056402371900b005066a9d2db4ls1125751edb.2.-pod-prod-gmail; Fri, 28 Apr 2023 12:36:48 -0700 (PDT) X-Received: by 2002:aa7:df0d:0:b0:50a:1f98:3433 with SMTP id c13-20020aa7df0d000000b0050a1f983433mr16460edy.6.1682710608288; Fri, 28 Apr 2023 12:36:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1682710608; cv=pass; d=google.com; s=arc-20160816; b=I08G2QlLLAei5zFejGZHc6Cnm6k+/lHfnSKBQEtGW51POFfJQ01fH9zGoIcdwj8vFU csx1WZjdQMhKaufPxWeb9YRAq1AKIUWrsTMsBKknKDZHx9aL8rweD2XNRXge1eyBm6mF OVu14f9wsyDAsXuM91JB4f0lIaX84D3WrtEnP2AurkFoWQFm+R8WWVcHP3R6Wd4QggdW pGL1p/hu7Pviwkl6Ju8Be3ycw20UvgEigFVCfeC7X5c17NKX412pL2GXmRJ95RsFgGUb G1jQyR8aKNppkaX09C3jIUYPpQQim17I2dM1VaesqeYLxJTOXOuhbXLL3iRZCerz8hCs w0fg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:message-id:date:subject:cc :to:from:dkim-signature; bh=/SDSy2Ffkb1A2hklzFryVBRpZ5VrqADAB4SlohnqbUs=; b=door3Lg6DWzRHZQGh0Ig4LzvCoBlbb3T28pQ1yiplG5D8pVMQa/v3xIbMTwqh5NZvA hx80Ow/w7Sq3VI0MFfaCoYYPetRiMQiwrj9YDU7OYPB8HmIX31FXXdWrwzTwyKqy7mkk s2usMihvNFNgwCgJKtHPco9siVF3LNr/FSsUg4dmbWxNQNiS8td94PNVXxHAUWFeyNvs a6Z4b1tnwv7I4d/i9u9N0mSSoYVmdA2siLJq7WLRsPywu/R4qv2uhXAp+AKyoi4hVdMO +ICT2CoaPp8x1Rf+eLR1aVKPW90K05ReYjqaNn5qgW+vfZfG6+Uwjt4HVOV0WbU4pQJL X4qQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=Q2dQQiez; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 2a01:111:f400:7e1a::61e as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2061e.outbound.protection.outlook.com. [2a01:111:f400:7e1a::61e]) by gmr-mx.google.com with ESMTPS id i15-20020a0564020f0f00b0050a31d1615bsi65284eda.1.2023.04.28.12.36.48 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Apr 2023 12:36:48 -0700 (PDT) Received-SPF: pass (google.com: domain of christian.storm@siemens.com designates 2a01:111:f400:7e1a::61e as permitted sender) client-ip=2a01:111:f400:7e1a::61e; ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gtl4Wtks4N6qCSHV/anvhf9ky84Qo6ciUQAsBtyKTctJ933BZ2lURP+LIz8vbZ2VIt/4aE+riZBjCL1QhvevAOQLtabpVO2dWOAsti+X+LHCKkOkzAujsFAaOHIUTAL7xK9LTkdxHqxo2nOfIzl0cBNI3+azDrxPwjQvJk0van5HIZ4q6Dh9QdLOP4yCMHFRf2XqzWGrmj+G3uVOv6v0yw+cetSTlkyKQIvXmO+Qx63+cysf5SQC7ZEopGTVFJHEP6T0YMJOs3qPhgrSsrtQJETsfCes8VlnX/CccFHZoZGw4zXGH88aZP4qPdw2ZE3zkt3cq98uStH01yly/0/JTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/SDSy2Ffkb1A2hklzFryVBRpZ5VrqADAB4SlohnqbUs=; b=dzpQH+i5swYqh7oQhqU3unbdBw6IKS3GXNPQNLSXHKiOvITLSNKdnXVON56+ltST8gouBMoxPNLHstH1E+M6d5XL3TtHBYsmHikUK9T3pe/SHm8rbf0mt2KCuhZQwiTp5AfxnFouhDaEdNzxA6QizrfI/cyRSy3d/Ut2ksbAP4rS2/9x+i70y79ZIaY5eAwJKY8Ejy+LE9BfrQs2oIAef5wjqvWT1iRHE1+mG11TT4Ne8PAQO8xiBYMB0KFbS4iBcZgAQBSSGbTyK9kKIt8i2DBEe3+Pdb2C8QuO1K9i1e5VTy/5dbpbjMnTVA+sgvtukhPCNTZ5MAiG08kWOHXizg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none Received: from DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:333::17) by DB8PR10MB3580.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:138::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.22; Fri, 28 Apr 2023 19:36:47 +0000 Received: from DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM ([fe80::c971:b72f:7778:559]) by DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM ([fe80::c971:b72f:7778:559%6]) with mapi id 15.20.6340.021; Fri, 28 Apr 2023 19:36:47 +0000 From: "'Christian Storm' via swupdate" <swupdate@googlegroups.com> To: swupdate@googlegroups.com Cc: Christian Storm <christian.storm@siemens.com> Subject: [swupdate] [PATCH] channel_curl: Set charset in Content-Type Header Date: Fri, 28 Apr 2023 21:38:02 +0200 Message-Id: <20230428193802.38596-1-christian.storm@siemens.com> X-Mailer: git-send-email 2.40.1 Content-Type: text/plain; charset="UTF-8" X-ClientProxiedBy: FR3P281CA0068.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:4b::15) To DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:333::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR10MB5404:EE_|DB8PR10MB3580:EE_ X-MS-Office365-Filtering-Correlation-Id: 9a6b2671-bb2a-4700-6a3b-08db481fe7a5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oF9LS5VKkj7pnDTbbgQfukxmHZzGktfXmI1HEN+akBNTZ2VOr2pSN842yzddoKTmivlISGhS6B4QgKXVfTqE/xr1tEg2t90wPOL7Hy0KPn6gGuskPFm2bx2hILoBhD+Hih1DHmvFj6vc3tfvZsL5GxqPscjnH7POo+tpJH0gnMTtnKZU/So3G76wO8ENU0Tku1Jnm6N4WJtnCJ+HkXjcEv4x7hiUOh07PvrYLTGhg4uQTfP5dpm8XGUEHAWgKZJyvWxgUMFCmXzKpBx2WUr1ldv4Mkbyi6y7OLqERN2gn8RpCIoa3EDP/QHnM3C8Q4uMeMUJBIfzyuC0Zq5G5NHAHUxjJuWLhda/anGKOLS1n0zPt9Byc/Q1LS73gEMqmTsyOLq1xMhrpZ4pFHJ3MM/ibowNMYVujEhc30m/JolCqxianuKuLflGplB792U8O0nVeMUg62NgZWX+k7t//6jQyQk7HATsKx23jCCNOuDJyHiwTfUGYVdWrckcnQHZIh0pEhF7wAO4+bKCfWTrk6ECHxZPvfHPptdQOAHb8VceAwA+6fsUmfefR2GlW5ok3XTE X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(346002)(366004)(136003)(376002)(396003)(451199021)(2616005)(1076003)(6506007)(66556008)(6916009)(66476007)(66946007)(316002)(4326008)(41300700001)(107886003)(82960400001)(6512007)(83380400001)(186003)(86362001)(6486002)(36756003)(478600001)(6666004)(5660300002)(2906002)(38100700002)(8676002)(44832011)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: C0rsCEzXcIvZs2+sw6UaLxpROCyRiMxnZ+QyyzKJyuSlBlzHvcVy19I64f3hTAAmkqG9QHV2TB5ML08uaNafDY20fZ35maKozTW0DEp3l+E2gInkdDe+sBA7PIMKLZP7xAAihhfdgspg5N7nbLztUSPr/BRaeduz7+UcmU8Kk05iyi90MAHxqutlH47oSePDGKjPNa+gRBV91F7RGjL0XcS+MnWUAhREHMRv4P2lK3zqejqW1uCu0cPjZ7EJx5zue8r9EX5aMRYh4yk58oBdbwnPqak+WvZadzG4CiuVNew38WqdSkx4RKkroUzZMsNNznKh3KXifJc61ftJptYSn8Is2knGDCFac9nk7ICCGoM6O2xmRVfQt7fjIOtboPPPk6QX7tz4XLSijdLVStrtqsfwDwJyoeJsBfyW8J/bhlx0nf32ApdMyiQze00CioAKt6608XR4RsX2LRjPHLyYhOXDXOjevDyHtJpqDP0PWhKJCq+G4PinL0EyI8TI4X/tGqaTJAMHi9IVTmT/SaIEwMzaPh2t9OgsdJJms7Mdm3/N43vkgJ2TwqWZ5pXC/sXk5dv0D6RCJe5QBaFupMhYre1Q5uLcOnpNEeZZuYkI3FG+qVjDYEizk+6kVD1qJLiW7wyKFBa9Z590UylZo+bBMNsECzVSV92ln+gHd5Q1Ss30Ei8F3tzZxxaLFjsA7uSeogaUAqtkoaoPoJPVKCAsQJYGZ01Uv1QOr5Z/D1PhZgl2aKko9O3fZzy0zku1wQvOjUZ23i3+aEwVhPCiJ8a8lgyNV/UGIlAmD//3hzplarUllw1kaYFR/de63jCmNZAoPm6i9xmI2bVGKl4Oqrm0/2XMzOXlEW1sbRGPvxpL7GrrWzFdYb2YSbnH4lUeZCmDXcpscIVtH0ncZeERsdx6EI3XjEh7FgCKyffgsTfSWRzCryTNzcZhLLvUSgGy/QcTCYKTWhwi17mJIJ8ZQkTmn2odL1JnKadpEAsUFA2m84PjznH1wFiMx/ZV3OvkGbnVevdUGOkFGxcTLp9wdeBdOdmMOkM2XSpkw3eLNt2X56GKH+LiTK/aFP8uJuVXSdf/0q/+QegwKzobDSWCQ9BGAXyVEl+uVR02pk17Dq/x3bSjfvl3MeVJg0ykat5wx82SXY2VkdM3VmqvMtYqKP/DLFNz8dCYLNIKRZ/x7e/5rASr19qwgXwpd0K5+FNMr9iRujUAIqQh3XNOrgr4axC5B1dP6+XYt2jP1PWFDmzDi1VrMM8BhQ4N7vV7Y8PIyIM3RChouUjbE4VDiiH0uvHzDvLasynvMjqIbdKR0wFpz1qP5k7F4FrZZ8JOkNvOLiQITFgsoHkiRmltQrDS25uZZ6q5SYaDqmGZdyfVZ3/iGRPCa5G2qn5nd3u5c05o/lRnihdFQpMG6apRu/udIXN8++MdguZYbCns7hRV+Q02iptr5f6VjDrYZlkZ0OwVX0RWuZ2gRs8kPQQoxPXYm6DD2LAwdYoUOjX3+yNkJk6RJIojNKooLlbE9xB5bWnuyNK3NstA+V2w1LGHImt28jWFeFKbTIYoYzpKJa1HeoVEqk1bP5kJBdEv+8qZNySxO/RqqiMzb4XeuMQkolXJJdUUVLcBcRUTKRhiaY8SNcXilRUwq2YvAfD5G4Jlm7SxC0S7cVb9E2dq8AejmZ4ZAzpkRg== X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a6b2671-bb2a-4700-6a3b-08db481fe7a5 X-MS-Exchange-CrossTenant-AuthSource: DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2023 19:36:47.1639 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MtXBrnMs4b+f1RorcSjBrEuTjtqhgaZshJrrYpOqBM+twDeP7wBYEqktngLB1TOZDR0Zc7INI+q4KxbjqBEbMMD1WGpZl6dC160t3VTi2is= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR10MB3580 X-Original-Sender: christian.storm@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=Q2dQQiez; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 2a01:111:f400:7e1a::61e as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Christian Storm <christian.storm@siemens.com> Reply-To: Christian Storm <christian.storm@siemens.com> Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
channel_curl: Set charset in Content-Type Header
|
expand
|
diff --git a/corelib/channel_curl.c b/corelib/channel_curl.c index 438950b2..c94f5045 100644 --- a/corelib/channel_curl.c +++ b/corelib/channel_curl.c @@ -524,41 +524,26 @@ static channel_op_res_t channel_set_content_type(channel_t *this, else content = "application/json"; - if (ENOMEM_ASPRINTF == - asprintf(&contenttype, "Content-Type: %s", - content)) { - result = CHANNEL_EINIT; - ERROR("OOM when setting Content-type."); - } - - if (ENOMEM_ASPRINTF == - asprintf(&accept, "Accept: %s", - content)) { - result = CHANNEL_EINIT; + if (ENOMEM_ASPRINTF == asprintf(&contenttype, "Content-Type: %s%s", content, + !strcmp(content, "application/text") ? "; charset=utf-8" : "")) { ERROR("OOM when setting Content-type."); - } - - if (result == CHANNEL_OK) { - if (((channel_curl->header = curl_slist_append( - channel_curl->header, contenttype)) == - NULL) || - ((channel_curl->header = curl_slist_append( - channel_curl->header, accept)) == NULL) || - ((channel_curl->header = curl_slist_append( - channel_curl->header, "charsets: utf-8")) == NULL)) { - ERROR("Set channel header failed."); result = CHANNEL_EINIT; + } else { + if ((channel_curl->header = curl_slist_append(channel_curl->header, + contenttype)) == NULL) { + ERROR("Setting channel header Content-type failed."); + result = CHANNEL_EINIT; } } - /* - * Add default charset for application content - */ - if ((!strcmp(content, "application/json") || !strcmp(content, "application/text")) && - (result == CHANNEL_OK)) { - if ((channel_curl->header = curl_slist_append( - channel_curl->header, "charsets: utf-8")) == NULL) { - ERROR("Set channel charset header failed."); - result = CHANNEL_EINIT; + + if (ENOMEM_ASPRINTF == asprintf(&accept, "Accept: %s", content)) { + ERROR("OOM when setting Accept."); + result = CHANNEL_EINIT; + } else { + if ((channel_curl->header = curl_slist_append(channel_curl->header, + accept)) == NULL) { + ERROR("Set channel header Accept failed."); + result = CHANNEL_EINIT; } }
Replace 'charsets: utf-8' HTTP Header by 'Content-Type:' Header's 'charset=' parameter: As per RFC 4627, the default encoding for application/json is UTF-8. RFC 8259 demands that JSON text exchanged between non-closed systems must be UTF-8 encoded. It continues to state that no 'charset' parameter is defined for application/json. Hence, while adding one has no effect on compliant recipients according to RFC 8259, do not add a non-defined parameter. This also fixes adding the Header 'charsets: utf-8' twice for application/json and application/text content if no memory allocation error occurs. Signed-off-by: Christian Storm <christian.storm@siemens.com> --- corelib/channel_curl.c | 47 ++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 31 deletions(-)