Message ID | 20211114172733.71602-23-sbabic@denx.de |
---|---|
State | Changes Requested |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRBOUOYWGAMGQEE25JJJI@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=m0nRD7i0; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::339; helo=mail-wm1-x339.google.com; envelope-from=swupdate+bncbcxploxj6ikrbouoywgamgqee25jjji@googlegroups.com; receiver=<UNKNOWN>) Received: from mail-wm1-x339.google.com (mail-wm1-x339.google.com [IPv6:2a00:1450:4864:20::339]) (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 4HsfRx3dVtz9sWJ for <incoming@patchwork.ozlabs.org>; Mon, 15 Nov 2021 04:28:29 +1100 (AEDT) Received: by mail-wm1-x339.google.com with SMTP id o18-20020a05600c511200b00332fa17a02esf6922621wms.5 for <incoming@patchwork.ozlabs.org>; Sun, 14 Nov 2021 09:28:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1636910906; cv=pass; d=google.com; s=arc-20160816; b=kaNyZmiNuEYUYRzhmmd4nBRnYYK40RCAYcSUpsA+vgymwpBeWxiuwDCVJfLdOHv7l3 mZGFp+Fy8Z8EDQL1aF+Xqb1uqd0GqXPNTOHD0M/jW74XDvSwDe/UClohwTYDhnhwu8j+ cxNENNYAOIilXAMFx2d8VjFE12s0yFf3ZjeZLRFU6sfTXlV4unoIXUfFSBl6F9eg+bPd 1Fkf2nKPcj1OiPoBg1/ww7cHpTEAy2KGRrjJwHE5ooX828rVMYP+HOvD/2CHEDGwiSEa j0CXmSyd3dWrdrJ1YCNxzSyUCVaxDaB3I5iftriz+v+v2bHh9Va3P9raKcIGxluRNlRW 1d7w== 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=0VxCc2NsH5mn6bs4ps8q2I9WgwCkMnm3YX9IBbHwIlQ=; b=Z4ZsbsyvhQCGNhd9bXOYOg7xi6LESUzCVZTX8XRj0hxTz9vSyNvDiIOGecPzblRPOW uXAbKEOoVxDcYKEqNtbynf/hsWTeQvFOlPfas0NIUipQoukvs7Qiousc5TrbH5LEPiT1 s3SkeCn2Adi3aZwXPtDWPwhyNUxkpKAoC0G7UlqIuLmWew84RwXoXXY4knLZRFtQq64w q5Mooy6rn6eZlq+vFBwUKZ7dWNaHL9ENRWvhBM77F4gMpXGzWXSAwk44KPapoYN+g1Qj ruUS+bFWj0/OnBht/lQbGwvSbmmuL+nUBZ0fAGaGTa3ayFvU7kThWEcquqsSmisJHVb8 YfOA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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=0VxCc2NsH5mn6bs4ps8q2I9WgwCkMnm3YX9IBbHwIlQ=; b=m0nRD7i0Ev1Wgl8A9TIcIC6BPScU7TX7nl6AZdQe46hBOmY7V0bphT6IzhPWKRLC+W P9sFrNBYVSDArzKA2JBV2MYXZp3bn27yqnpGDwhcj/IbYgNjTVxK04k9634ikjO4thUi AfjGlsgOvl7aaZVo99FE+sGO32RQB4h8nmTsf47NS7eijI2+UGCSbZxK6jdu23oqbHv4 +cpZ46d+8dSq5OHo/lTFYn2x0pmvbP0FAvFGi53I+GzRr2vbrhzrbD++Od4QVx1RfdU4 B5cFxnFtDrxMtGMuPcss29JLrqBLbkln1/gUhZCh2EVEjQPgPyFpVcBOOsl28UdXDONx HM/A== 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=0VxCc2NsH5mn6bs4ps8q2I9WgwCkMnm3YX9IBbHwIlQ=; b=T+a7IoaIijYudwD4GqLT0eEHg0SlwUkPO7oKEaLl3M+LXi3bgEXbTlxjCz9zW787XX kbUqihPtPImTW6HdO02SmZzGqrwkqljrW1wE81lltosRRG7G1o1C0irIVIzuOSc3F83f nwJfIHO9Zcz9gxf8yfpXK4KJca2Osfv9S8fGxoxbeRlnM1IJneuOsiCkQ2bjapixzFrI mfpy/6LvJu1KlGLlB9OZSm4O8b7+GPj+4NVymuG3Oof8YOiaRuc2l6Z/VNj41kGSIXF9 4N4nlgRXypKXNzI7zadzT42qkx4X5TcRlOXQnyIn+Dz+8lwIPWM+WwJTv/QaBYsoV7eD w0rA== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM5303l8hl733E5q7UgnVa/IBOrK5+e0oZ6O6SSxS4QeAR7S56Rl+z jyol9jKp8L8sizcsvEFIigA= X-Google-Smtp-Source: ABdhPJzzq/bf3nqN22Iofq6abBs3Wd70Pkb4FUnd/pEiCvlFWUBzp2uAFNklD0o1f1gZZFQz5QPgqg== X-Received: by 2002:a5d:46cb:: with SMTP id g11mr38851796wrs.26.1636910906222; Sun, 14 Nov 2021 09:28:26 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:adf:fe0b:: with SMTP id n11ls7201656wrr.0.gmail; Sun, 14 Nov 2021 09:28:25 -0800 (PST) X-Received: by 2002:a5d:568c:: with SMTP id f12mr38353311wrv.240.1636910905420; Sun, 14 Nov 2021 09:28:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636910905; cv=none; d=google.com; s=arc-20160816; b=bh3Sh38b+gdm+Q2R/gm8L6rCrtcG6ztKAJvZ/CvhbL27/in7o4vN3IZl4N6Yp/hKdh hP8KrPzbKp1/algWwByrHkHX8INaNml7fyCnn0mIBuGyHGfjGxGwdhvNO6fEYBdSke18 MjVskto33sufBfyT8jtaIQxgt0H7xuD4ebomWodvGgf/CypckZ1u9x4gWLkKi3Xzf2Fa /9GAA3sqUYJy5f7zHVkd/Ae7E9mbHxmAz0nLybd2VrZ4uH/eXfNUHnlvTbLrDomYXQiS 6dgd7JnZFM97n0Fgnb339q2tpSs2l0mCI4FqogIitfIpUJ9RNULJWmUfDD+qMFmMXLw/ moBQ== 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=JYZI3u2t+Smpa5Nwd3EsT5ZRsknAeep2zIeN4dCuJrI=; b=gr3rrsohRHQ2fkePcC+gUzXaCmHDzDWJsaxM1mpigEafy4bsmRj4Omz3l0EZK3w/KI gj/bHB+NatBSezzGFcMpi2yYvCahF36XGqZpVut7RvzYLMaUnBuQ/bI58A0SxTG3H5Mw 91zZ3wTxsQqB+CRf0cg8khUno25rpFWZEYZFnAinXoRfXwf02dJNO/8cZ7+Bds2Yzp5K 6zzTwBP3xsPVtpkO7/rpxpYVpkwWvlCY/04thF4ftVqcT6XXMgyR2PB6iVIVzxT3PBlt wNHSa/V25WR0RFnflJ8+Yt/cnH4DZ2KeFM59dgxAkLcd2tg8DrxDH1vgOTzyH3pvziLy O9AA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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.9]) by gmr-mx.google.com with ESMTPS id w2si599131wrg.5.2021.11.14.09.28.25 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Nov 2021 09:28:25 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4HsfRs1xmVz1qwdP; Sun, 14 Nov 2021 18:28:25 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4HsfRs1qMFz1qqkB; Sun, 14 Nov 2021 18:28:25 +0100 (CET) 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 iX_2B8hjVwvd; Sun, 14 Nov 2021 18:28:24 +0100 (CET) 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; Sun, 14 Nov 2021 18:28:24 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id D742D4540853; Sun, 14 Nov 2021 18:28:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id UaH4iVRim7Xs; Sun, 14 Nov 2021 18:28:21 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id 6835345427E7; Sun, 14 Nov 2021 18:27:46 +0100 (CET) From: Stefano Babic <sbabic@denx.de> To: swupdate@googlegroups.com Cc: Stefano Babic <sbabic@denx.de> Subject: [swupdate] [PATCH V2 22/36] channel_curl: do not check download size if range requested Date: Sun, 14 Nov 2021 18:27:19 +0100 Message-Id: <20211114172733.71602-23-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211114172733.71602-1-sbabic@denx.de> References: <20211114172733.71602-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.9 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 39c415d..2b9f178 100644 --- a/corelib/channel_curl.c +++ b/corelib/channel_curl.c @@ -1143,14 +1143,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(-)