Message ID | 20231120155459.45188-11-stefano.babic@swupdate.org |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBAABBWMC52VAMGQEXODZWRQ@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=20230601 header.b=hZ6tehaf; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::13f; helo=mail-lf1-x13f.google.com; envelope-from=swupdate+bncbaabbwmc52vamgqexodzwrq@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-lf1-x13f.google.com (mail-lf1-x13f.google.com [IPv6:2a00:1450:4864:20::13f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SYsXY4xPQz1ySS for <incoming@patchwork.ozlabs.org>; Tue, 21 Nov 2023 02:55:09 +1100 (AEDT) Received: by mail-lf1-x13f.google.com with SMTP id 2adb3069b0e04-50798a259c7sf4568379e87.1 for <incoming@patchwork.ozlabs.org>; Mon, 20 Nov 2023 07:55:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700495706; cv=pass; d=google.com; s=arc-20160816; b=ez91zDcJkF8wb2XAilg2DTziue0celmMzlhPOixBCKvGBKW4v7XyC3uJxJn9Kk7oiA appZ3l3n2hnrNQZJHc5Sr+rXRJJtwjK69FitS90A8sjRNKqE7skcvZKuhHGAbZtcGlTc Ny3v6RxuD2ZHBEiTFDq0e+Mr0mS3v+G6bKgkpiP1ydofk4K0MaajA8w9wi6KnuftOMMj bQRidffxaSAoqbIKHcRSoBPRDUuiMcf8SXFYEwMN6Y7WpypalelmvbRTmrDaw23zsO6W jMuXfhVLna9HlNNw1c0/vs+WlkbsqJC9arPZGPiZ5omP7xB28mAteh24me/ziKPYD94b 4kPw== ARC-Message-Signature: i=2; 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:ui-outboundreport:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=pt532cLTZTRu88b5mmPasybRngzlE8St2HKmGmlG7dY=; fh=TiEWcqMcKpHk5s7uErzpntoONrNfOXwKpI5P8bIlggk=; b=qZhac5DEmSqKTqLBi5bhzZ4Wk/bD2JLAS+PfbvS73m8qDwMsL+7cXTmBQCIDh7pVXI 1+xPpJsORr4hL7zSuwBecpLHb13qIZUlGRs6Aur+WwCFj82j51p3MyRGDdQGf8aDMub9 2o22E1uPvfE1f4UJgMKQNkJMGyYNOw/+p2R7HHbwexqV8t7wYIohBdoQX+ILOGnAnR7F Wn8lor4E5RHi5Rddt2jkBH45gutn6rOcwe2wwYEH14rLnhDxx+J/hpTX5nNLq5lGiTD0 VWyRmFHMDrbZfsLeCb51g2TaH1mqsct7QTIQUjLNZBqrUTGOawkORCmsasZeMOGz4Ub8 PZFQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.17.10 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1700495706; x=1701100506; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:ui-outboundreport:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:sender:from:to:cc :subject:date:message-id:reply-to; bh=pt532cLTZTRu88b5mmPasybRngzlE8St2HKmGmlG7dY=; b=hZ6tehafUh0tlFUogQSqjuiHvBvv0f0uoCW1cqnagGlpiENqiglun+na1/CkNlwOh3 7FfjCHX52QcNnR/ozNnkoj+XU764bWfuShsm2BRjaNCNAYfHhHA09khh/mauSJkqxuzS YxDPVlvEVSH08RKc/HgiGIAkuEFOt+pv3n7n7lAftPg7JvaRNvTzKKsKzO7xa4BzVW7b +zeHYfDadge34EoXjvISbo0n7NsJyh47nzuTw7TJ5RIHMMJhAmfASsR7qB4N4c59nqlh 7L6c2h2EAqUcrzQPC2aRnfJI1BubK1VI9UaIdrgf+bvyKHsPbLYM0NV5LJM7ChFxoaIx 93Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700495706; x=1701100506; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender :ui-outboundreport:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=pt532cLTZTRu88b5mmPasybRngzlE8St2HKmGmlG7dY=; b=Y/Xl2IlVrGjuJvgJKJgiIq1x4a/X34XACZ4Bvsc+BehRrHFKXPrOaCvw/yfyjyvwwY Hhvf9Ni6Svi+o47RN3ec6e60uyoya+55KZEVLgr5l7p6mVZ5rylRVDjr5m7LF0xmPTA/ WvqsANHknTT3elkeEXPoTrjTZ4g5k2dwVClj3LpWXy+Sxg4kLEuaa8TJOguVCFqCHdo0 dMNiZoz0beOyNV94sDcQmZSjfjDC+Szc3yAsPhgH8+T5eX159y1f36wq953OAJYdX+IK IU/RPO55gbrtDuKkZWFRZGOlhw5QBj1g1p+vQ6vBpWaUxkC6uQMJQLfNiH/+wdY2n80I yAxw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOJu0YwAfKEpq7QslPDrqrEi7h41WqPg2c2A7fY1+9W+cKTvxin+DlRY sIyURc3AV63YsP/y09n2r7A= X-Google-Smtp-Source: AGHT+IHCBjUJfwWeGgbmFUHtDFWpkR7UWHTW/WRS9soUe29sLX4KtirRSbDlWlTpsEGD3zK2oBmpwA== X-Received: by 2002:ac2:52a4:0:b0:503:26bc:b08f with SMTP id r4-20020ac252a4000000b0050326bcb08fmr5501186lfm.24.1700495705761; Mon, 20 Nov 2023 07:55:05 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6512:104c:b0:503:7ac:19f3 with SMTP id c12-20020a056512104c00b0050307ac19f3ls174722lfb.0.-pod-prod-07-eu; Mon, 20 Nov 2023 07:55:04 -0800 (PST) X-Received: by 2002:a19:c511:0:b0:50a:2720:eac2 with SMTP id w17-20020a19c511000000b0050a2720eac2mr5795096lfe.4.1700495704109; Mon, 20 Nov 2023 07:55:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700495704; cv=none; d=google.com; s=arc-20160816; b=b6U1slHkVJnZG3jtl4HyEt7m6H4WYq0sWxqzs0zWXwGgrJncy0GZ5uRAO/TYMWJEyJ U7gb/bg1L/Grg0UkfMtwv6e6NgYXTbmqWrfoIN37ekDwqe6NtOnQNblQAxVQF90ZH4i8 s9JXxeZfLxAl39xVE794f9oHBxlG8g0OI9sPEv6XWoenRFsxpmtsYMCv8OrN6wW6y6/Y TqOJjB3xJh6TF8daVZkFntFVFfCElIpzbz0i8JqRHE2ODLIs3OJN6QzSuiPriQZ7QBw3 Gn03v93T/szifEgduI7+7x/a3a8ZMybai12mh959QOMhEUvn+4Dcvmgo0AVrBhTQ8u7f G8mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=F0IibJoGfiGx2ml21Dh86y8XBgm0rpPLEDwUJ6FFd9c=; fh=TiEWcqMcKpHk5s7uErzpntoONrNfOXwKpI5P8bIlggk=; b=nlfVAHTbHTemyTa30JPk6fg90RQM9VbK0txjjiVHB5Dw4Os3aYZcVBLzZS4yv77dT2 i0qP7JMuOun3fbp7Kn9h2ES2RtIF0V0dWM7dEY8po1+YmKTk9WS6fl71QtfGYHOVLWHA x3yJO7bOLZFS+aMA9gMwUp2HICNBDxwRpasNYit8NKhZm2VvRGAU1F90aJpy21/fKLuK 8s8MFUh7Ac/wEiK5Aj55CF1xDS1Cw0x0frjaQbP6067KtqthRq3r97eHAR3jNuQqmNvk GM/jRQ/IwqdtIimvcRFqBQ+iTB1dqppyuubNCdoJj10hTRmDXcl562i2oQqhp48vKfyh qnZw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.17.10 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org Received: from mout.kundenserver.de (mout.kundenserver.de. [212.227.17.10]) by gmr-mx.google.com with ESMTPS id fb13-20020a056512124d00b0050a72e696casi308634lfb.6.2023.11.20.07.55.04 for <swupdate@googlegroups.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 07:55:04 -0800 (PST) Received-SPF: pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.17.10 as permitted sender) client-ip=212.227.17.10; Received: from paperino.fritz.box ([88.217.136.221]) by mrelayeu.kundenserver.de (mreue109 [213.165.67.113]) with ESMTPSA (Nemesis) id 1M6lxY-1qz5Wz1a6Y-008J9C; Mon, 20 Nov 2023 16:55:03 +0100 From: Stefano Babic <stefano.babic@swupdate.org> To: swupdate@googlegroups.com Cc: Stefano Babic <stefano.babic@swupdate.org> Subject: [swupdate] [PATCH 10/13] channel_curl: allow different content-type for send and receive Date: Mon, 20 Nov 2023 16:54:56 +0100 Message-Id: <20231120155459.45188-11-stefano.babic@swupdate.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231120155459.45188-1-stefano.babic@swupdate.org> References: <20231120155459.45188-1-stefano.babic@swupdate.org> MIME-Version: 1.0 X-Provags-ID: V03:K1:gaOz7wQ8PBZD1kvXaes1MKzCP/5COFN6G/z6emFFWjeX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C+OHIWBzPh4eMSIaH5oeee5nfup4QptOuye9uq6tKKaV3Cm1ZhI9GPX0Nq2Go/VSj yWV84Dv5rGoyP8CdcAV+J0PuCIUPm7moNugE= X-Original-Sender: stefano.babic@swupdate.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.17.10 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org Content-Type: text/plain; charset="UTF-8" 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 |
Native Docker Support
|
expand
|
diff --git a/corelib/channel_curl.c b/corelib/channel_curl.c index 27b31247..4ac089b8 100644 --- a/corelib/channel_curl.c +++ b/corelib/channel_curl.c @@ -547,6 +547,8 @@ static channel_op_res_t channel_set_content_type(channel_t *this, } } + if (channel_data->accept_content_type) + content = channel_data->accept_content_type; if (ENOMEM_ASPRINTF == asprintf(&accept, "Accept: %s", content)) { ERROR("OOM when setting Accept."); result = CHANNEL_EINIT; diff --git a/include/channel_curl.h b/include/channel_curl.h index b3b51e85..b346a6c5 100644 --- a/include/channel_curl.h +++ b/include/channel_curl.h @@ -61,6 +61,7 @@ typedef struct { char *info; char *auth_token; const char *content_type; + const char *accept_content_type; unsigned int retry_sleep; unsigned int offs; unsigned int method;
Allow to have different content-type. This can happen when a file is uploaded, and the server answers with a message about the status. Signed-off-by: Stefano Babic <stefano.babic@swupdate.org> --- corelib/channel_curl.c | 2 ++ include/channel_curl.h | 1 + 2 files changed, 3 insertions(+)