From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by sourceware.org (Postfix) with ESMTPS id 7BBD33858D1E for ; Wed, 29 Mar 2023 14:58:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7BBD33858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x636.google.com with SMTP id o11so15207913ple.1 for ; Wed, 29 Mar 2023 07:58:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680101900; h=disposition-notification-to:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=QesOs341RrNCzMA+zXw94yXg31pB1cCBN/H1KoHirm0=; b=bSIKyFCY6CGpaUheNWrd/QdJmF8mNQo/Y2b4Y1R+hdhmxVTnIfKWLNDzToQ+2q+rbL +RsKl+GXe1QhjDiOudJcbU0dl9NlxmEXj9iV73MWWk4Bv9YVw3hjn7VzJ/JkddghgbnP qMIXnE0J/FDHiAUrFSjDeA4lOuNy/tDy2lloeUPRp05OnzXyLQwdLs1lmUsr2Cg5wlap d83F4+EJ2cpKgR/w0BRyP/YCFaUVKhtLnV1AjcYaD3ay0po1kGWOlk2EQ3sjkJkAX652 oJeC5cAE5vk8unHQGCjj1aBShG+WQ/rs/pvPppU4U0R17Di7IRYNtDv6zMpICi00GIYO HTqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680101900; h=disposition-notification-to:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QesOs341RrNCzMA+zXw94yXg31pB1cCBN/H1KoHirm0=; b=D87x+WiSPZxziL9vi8nO13r6WC3SvDrB3U+olLvAkCxBqtascWmwnRuF6ANMimbs0b BAlO5GWQmNRewnpm1m7pOER3h8GbB/HRioaPm7VT79G3lOj0updptArvsgAymGE72wXX EIU6Xq6zs8ZPdNgHqPjrEcDTDTCOMR1tmQkOBoG3iAhNyrfiIJT0FwnjfSFSRb65M6R8 2QiNye1CE2U5rTIa6C7uad7BiSNx73LJA8BltiQP1+KLSGzfkkjIDM+x7+dZt2ixxB7/ bKLfcDXLPf9DBACeLsh2WT16xZPrV3iYF9q9ruZuLHGjiu5PAbV31w+fmS5gnJS13et6 7pCw== X-Gm-Message-State: AAQBX9fGI2lsDniWri9CPTwUFGRKoCNujajnBmZPBJV9RFlnoSAqdyFW c3JqmCfBNR4l7yfOuc+MPgDP4ytUaLdN6Q0s8i8= X-Google-Smtp-Source: AKy350ayeKUSiHrO9bLKPwgfNKfa+AjWPCzWLXMVKFVBS7uBxWUOjzUkUbiPlguRoI1QifE6Wib8Bg== X-Received: by 2002:a17:903:2905:b0:199:10d2:b9da with SMTP id lh5-20020a170903290500b0019910d2b9damr16922875plb.58.1680101900332; Wed, 29 Mar 2023 07:58:20 -0700 (PDT) Received: from localhost ([2a0c:b641:69c:e9b8:1::1]) by smtp.gmail.com with ESMTPSA id jc20-20020a17090325d400b001963a178dfcsm23153521plb.244.2023.03.29.07.58.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 07:58:19 -0700 (PDT) Date: Wed, 29 Mar 2023 22:57:46 +0800 From: lilydjwg To: "Frank Ch. Eigler" Cc: elfutils-devel@sourceware.org Subject: Re: [PATCH] debuginfod-client.c: Fix download size not correctly fallbacks to x-debuginfod-size header Message-ID: References: <20230329045119.763709-1-lilydjwg@gmail.com> <20230329122835.GA30778@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230329122835.GA30778@redhat.com> X-Mailer: Mutt 2.2.10 (2023-03-25) X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GB_FREEMAIL_DISPTO,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Mar 29, 2023 at 08:28:35AM -0400, Frank Ch. Eigler wrote: > Hi - > > > [...] > > The reason is that when Content-Length is unavailable, cl is set to -1 > > by curl > > Is that behaviour from new versions of curl? Yes. curl 8.0.1 to be exact. > > but dl_size remains as 0, but later dl_size == -1 is checked. > > Or perhaps dl_size needs to be initialized to -1 ("unknown") vs 0 > ("known to be zero"), and that value mapped to 0 only in the > *c->progressfn() call down below. Yes, that can be done. Just more places to be changed. However, I find a bigger issue just now: the CURLINFO_SIZE_DOWNLOAD_T counts differently than x-debuginfod-size. I'm sending a v2 patch now. -- Best regards, lilydjwg