Message ID | 20211011112156.44192-20-sbabic@denx.de |
---|---|
State | Changes Requested |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRB6V4SCFQMGQEFTPQZFA@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=gQXZWa3S; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::43a; helo=mail-wr1-x43a.google.com; envelope-from=swupdate+bncbcxploxj6ikrb6v4scfqmgqeftpqzfa@googlegroups.com; receiver=<UNKNOWN>) Received: from mail-wr1-x43a.google.com (mail-wr1-x43a.google.com [IPv6:2a00:1450:4864:20::43a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HSbxV227Lz9sPB for <incoming@patchwork.ozlabs.org>; Mon, 11 Oct 2021 22:22:38 +1100 (AEDT) Received: by mail-wr1-x43a.google.com with SMTP id a15-20020a056000188f00b00161068d8461sf2677298wri.11 for <incoming@patchwork.ozlabs.org>; Mon, 11 Oct 2021 04:22:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1633951355; cv=pass; d=google.com; s=arc-20160816; b=mukZCXrhML1uNwHJIGWVgy83fZsceLcI6qGWrva5uZhDS3EQ71oSGQIsfLeq2T5rEg qdcry8ytPMzRrciD7VAJY1br5NAKzvhqbHxq/dUSjAH48rGiEJn3naG5iLZC9gZzyXk7 xVgbtNdlvxfU8TbcyzvHaHaWF5F37/VVWvnDxYATNXWGRskV3RacxJadA/MXa5SLNo1A tN3gokW/Geh5C1NFXiuvRkmBKkzoeebmBl0lgGgyZ2hVPnZWvYxvF+YfHYmbCc5p96QH BVy+o4Rb7OPyi48+NumIHddup8VVVOIHlHENA6zz4vNsKpW2RNKQUq3c3A5VByNX/4HO eSyQ== 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:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=drS6OT1umV/ccbagh/ki+vDsZJ4wSv32HXxlHVgT5tU=; b=T85Tlk7gTVs1XCAaDFoEMlYW2Z0LvapujMom4gzwawpCqpBl+C0xuhBWOLczSqEFKS MDZtUKZ+yMssjReHeCa+rEPA6qGuKV0ouAnKf9vAauDp11I8Pr/KO4+jJr7n3Z7eQz42 FAvm4SvWqd8gUElzTV/c/8dcRTZuK5Y09Ap+pzGxRX5cN3+WcNyx4iTTBxZcHnlKNIZj RT+WwvEHW2aGc/sTJXmh/Ahhptrh8sYoyjoob2gy9pNjBQvKdJ1hNC/mjhpEu+68d1zz D4grOgmIShJvgS0auVhvLvjuEv1WTo/PNRIPmn61EAXUX6NErtQEjdm1UsRpyKG7ZMW+ ElCA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=drS6OT1umV/ccbagh/ki+vDsZJ4wSv32HXxlHVgT5tU=; b=gQXZWa3SWa6m/h/qnt8giSHrLD+6LN5lNgW/Eos65hSg0iGuz8WJfAGhbuXt7RRhr1 4Bge7sx81W8rwonESrwoGThay74TpjCDq9a/ILolt3DlEkpk30xSdr5OzE9uODmaMAfG gxVkYKY4viGx5seA9R1QGIsHt5jdV8GT33XeRd/BlfwcXxHePzJdGTB9GUUFPWspVLXp RlGrPKuqFeKtij0OUBuefs8IaU8gQD94XCEg9wy76iTAiHPEBsiOxgVK4keYJTWnqb3Q YXFnuqjmhtnZQYe3yFwFa35Ro00YM774AJF1rF6+e02b03MVZil2YUcs+8/9MLYEmZ0L +Deg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=drS6OT1umV/ccbagh/ki+vDsZJ4wSv32HXxlHVgT5tU=; b=sukMeHWa2i4uGdICuK469cwuFbyw4Eib7ojyVTIUFfvBW1aJZGVUucf8+J5oQXcysd pk6RVF0fUTD6w6haeMqbPdtc9xMZa8ww4tcXQu83cRoy4SrmQKuukQtgzyg/3aMbfVBt CxqzGchW9WONv1s9edMRF11gfbjSLl6GJWmpDe5cbcQS1jT2xzkG7Cy6S5EQ2EZJ4qhu U/JLoZzsp2+xo49lkPWLU+73N0pMBCwbAwweshlo7uYxMWJ0g97bBRbPOKVjxFN0ty4D NI8SkeVbdZs1fojbb1MAPQvugX5gajMwy57rhmbmyJsZ+M63zC1wcNnA3FYSAcDniZ9a nCMw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM533ueKU0e4uwIUGUR1A7fBx9p1TY6l4d9E3Kq2wvjMA3c7Beg4jW sDX66p1KO3vU8W2yh28njyw= X-Google-Smtp-Source: ABdhPJyIqd3S2MOn3bk0do+Lmh4T7fnDPQFdf4JtxD2xbug/Svvlec6L6ueKAqht9ZBYxJfQAG0XVw== X-Received: by 2002:adf:a30c:: with SMTP id c12mr24453816wrb.366.1633951354848; Mon, 11 Oct 2021 04:22:34 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:adf:a285:: with SMTP id s5ls579497wra.1.gmail; Mon, 11 Oct 2021 04:22:34 -0700 (PDT) X-Received: by 2002:a05:6000:10c7:: with SMTP id b7mr7446126wrx.36.1633951354159; Mon, 11 Oct 2021 04:22:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633951354; cv=none; d=google.com; s=arc-20160816; b=HqBFvcRImCnjjEXNnz3I9IiwWz34cF2+gl1Q7padEIKqOQ0/LeeQxpI6ux6yE4TGk8 h2xl2CzBhqqY5I5wlrO2tEvUnaY2Kmed6+dvxnB8KVy1Njk5nr84zxkreA61uDZ0BU7y d15Zk8TPZCLHyUg0rG3LSgqW7bgxN66kusTQYHYg72uvEQWoZJH11S2DHaH3XQAXGQhe sFxfUCOa60jMtdhUGJP5d+JX0R6OwjCtmzAViLMFHmatWcQnvCfzVuV6UgpPIP2LlOCU RINBsOf/v4sD3J2gq5+8h+kazw2A9ze2lArfE0Y/7jdu99V4OdI/YdbpOSMoPGWAzrIO EXRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=XLFyBGT4Hk7J4P/l2j7qTBhATL9QdwbOkyTf8+6HQ9Y=; b=WYEVyeM9w0Ermq+vMmUpkhR/l54FzPSLYuMfNIe76EaP3setuquc3cosonckfsvzQL B+/KjZuH+1qydbLOTuwYckkZYUEBC/k1ypNDL+eH32DbUbfyugDTNOu4tEwpLoXsc6kH yN+aojT21kPFYfavnQxNYZh+KE7xErzVYFFh+WWT0oF56paCezFhu6sKi7HKEmyAfVH0 iw8K5VLB025fWRTT1Qt7bTdI8OyEbblHiJ4XV4PNUc+AYwrnphlUDytXCjmv6+Ut8YHv mjEFZTqusGJWdkdw4/EaJFQU03VYcL1is2kryGNweEUm1CsWSUVmokVoZIsH1TXL7vb8 hYwg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.10]) by gmr-mx.google.com with ESMTPS id a10si480050wmb.0.2021.10.11.04.22.34 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Oct 2021 04:22:34 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by domain of sbabic@denx.de) client-ip=212.18.0.10; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4HSbxQ01Yqz1sC07; Mon, 11 Oct 2021 13:22:34 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4HSbxP6x59z1qqkB; Mon, 11 Oct 2021 13:22:33 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id ZgX9YlR-ji2E; Mon, 11 Oct 2021 13:22:33 +0200 (CEST) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Mon, 11 Oct 2021 13:22:33 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id C64634541344; Mon, 11 Oct 2021 13:22:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v-V0XlfdK5mJ; Mon, 11 Oct 2021 13:22:30 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id 546DB454272E; Mon, 11 Oct 2021 13:22:06 +0200 (CEST) From: Stefano Babic <sbabic@denx.de> To: swupdate@googlegroups.com Cc: Stefano Babic <sbabic@denx.de> Subject: [swupdate] [PATCH 19/29] channel_curl: do not check download size if range requested Date: Mon, 11 Oct 2021 13:21:46 +0200 Message-Id: <20211011112156.44192-20-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211011112156.44192-1-sbabic@denx.de> References: <20211011112156.44192-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de 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 |
DELTA Update
|
expand
|
diff --git a/corelib/channel_curl.c b/corelib/channel_curl.c index bed631b..4aebaa5 100644 --- a/corelib/channel_curl.c +++ b/corelib/channel_curl.c @@ -1147,14 +1147,20 @@ channel_op_res_t channel_get_file(channel_t *this, void *data) } download_callback_data_t download_data; - if (channel_enable_download_progress_tracking(channel_curl, - channel_data->url, - &download_data) == CHANNEL_EINIT) { - WARN("Failed to get total download size for URL %s.", + /* + * In case of range do not ask the server for file size + */ + if (!channel_data->range) { + if (channel_enable_download_progress_tracking(channel_curl, + channel_data->url, + &download_data) == CHANNEL_EINIT) { + WARN("Failed to get total download size for URL %s.", channel_data->url); } else INFO("Total download size is %lu kB.", - download_data.total_download_size / 1024); + download_data.total_download_size / 1024); + + } if (curl_easy_setopt(channel_curl->handle, CURLOPT_CUSTOMREQUEST, "GET") != CURLE_OK) {
In case just a part of file via bytes-range is requested, do not ask the server for the size of the file to be downloaded. Signed-off-by: Stefano Babic <sbabic@denx.de> --- corelib/channel_curl.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)