bugGNU Wget - Bugs: bug #20363, Enforce strict download quotas


bug #20363: Enforce strict download quotas

Submitted by:  Micah Cowan <micahcowan>
Submitted on:  Fri 06 Jul 2007 09:59:29 PM UTC  
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalStatus: Awaiting Approval
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Open
Release: NoneOperating System: None
Reproducibility: NoneFixed Release: None
Planned Release: 1.14Regression: None
Work Required: 0 - HoursPatch Included: No

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Mon 09 Jan 2012 12:46:25 AM UTC, comment #18:

5.diff is now utterly obsolete, according to the current trunk. All should be redone almost from scratch, I have neither time nor necessity to complete this patch, so the maintainers could delay this task to indefinite time until somebody takes this task over.

Evgeniy Philippov <molchuvka>
Wed 12 Jan 2011 06:47:51 AM UTC, comment #17:

Idea: --god-quote
Meaning: modes of operation or otherwise: kindness and so on.

Evgeniy Philippov <molchuvka>
Wed 12 Jan 2011 06:38:31 AM UTC, comment #16:

Bug research data follows.

Incorrect messages are: "Download hard quota of [...] exceeded!"

wget with 5.diff applied:

Analysis: Downloaded subarray length L=86M is less than hard quota H=130M: L<H.

Downloaded: 1 files, in 26m 2s (56,1 KB/s)


#wget -t0 -c --hard-quota=130M -i1
--2011-01-04 17:25:34-- http://releases.ubuntu.com/lucid/ubuntu-10.04.1-alternate-i386.iso
Распознаётся releases.ubuntu.com...
Устанавливается соединение с releases.ubuntu.com||:80... соединение установлено.
Запрос HTTP послан, ожидается ответ... 206 Partial Content
Длина: 725604352 (692M), 89796739 (86M) осталось [application/x-iso9660-image]
Saving to: «ubuntu-10.04.1-alternate-i386.iso»
Hard quota: 136314880 (130M).

100%[++++++++++++++++++++++++++++++++++====>] 725 604 352 59,0K/s в 26m 2s

2011-01-04 17:51:38 (56,1 KB/s) - «ubuntu-10.04.1-alternate-i386.iso» saved [725604352/725604352]

FINISHED --2011-01-04 17:51:38--
Total wall clock time: 26m 3s
Downloaded: 1 files, 86M in 26m 2s (56,1 KB/s)
Download hard quota of 130M exceeded!

Analysis: File length L=70M is less than hard quota H=100M: L<H.


#wget -t0 -iurl.txt --hard-quota=100M
--2011-01-09 06:32:35-- http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.37.tar.bz2
Распознаётся http://www.kernel.org...,,, ...
Устанавливается соединение с http://www.kernel.org||:80... соединение установлено.
Запрос HTTP послан, ожидается ответ... 200 OK
Длина: 73577826 (70M) [application/x-bzip2]
Saving to: «linux-2.6.37.tar.bz2»
Hard quota: 104857600 (100M).

100%[======================================>] 73 577 826 59,3K/s в 21m 14s

2011-01-09 06:53:54 (56,4 KB/s) - «linux-2.6.37.tar.bz2» saved [73577826/73577826]

FINISHED --2011-01-09 06:53:54--
Total wall clock time: 21m 19s
Downloaded: 1 files, 70M in 21m 14s (56,4 KB/s)
Download hard quota of 100M exceeded!

Evgeniy Philippov <molchuvka>
Tue 04 Jan 2011 01:15:06 PM UTC, comment #15:

Still a bug. Outputs an invalid message. I will fix it later.

Evgeniy Philippov <molchuvka>
Mon 27 Dec 2010 07:00:20 PM UTC, comment #14:

There was a bug in an "quota exceeded" report always triggered when hard quota reached. Fixed in 5.diff

(file #22298)

Evgeniy Philippov <molchuvka>
Fri 10 Dec 2010 03:17:06 AM UTC, comment #13:

attached a patch v.4 for the current trunk. Tested, it works.
patch: 4.diff (attached)

(file #22170)

Tue 09 Feb 2010 11:50:38 AM UTC, comment #12:

My current decision..... Wget is already safe, works, and does well. Some bugs are OK; heads up dear Micah! My current direction..... --only1

SPAM: http://integralpancha.ru/ (Burunduk alive totem animal, the Owner of Tayga, is in left top corner of the page today. Burunduks are very-very small, have several stripes on their back, and a clean white

Evgeniy Philippov <molchuvka>
Tue 09 Feb 2010 11:23:41 AM UTC, comment #11:

Resuming coding, loop { checking, testing, debugging, fixing }, publishing patch for --hard-quota (other coders may add --strict-quotas) to fetch GNEWSENSE =)))))

(Another, much more safe, way for me is to not touch wget, and to implement or find --only1x type option to configure my cdma AnyDATA driver, to fetch GNEWSENSE.)

Evgeniy Philippov <molchuvka>
Thu 24 Dec 2009 04:31:33 AM UTC, comment #10:


TEST RESULT: last patch: BUGGY


cat url.text

this was done multiple times during a month:
wget -t0 -iurl.text -alog.log -c --hard-quota=120M &

WHEN ALL DOWNLOADED, there was md5 sum mismatch!

Evgeniy Philippov <molchuvka>
Sun 20 Dec 2009 06:09:00 AM UTC, comment #9:

replace comment #8 with:

ideas for recognition and critical thinking:

--quant-size=N is used for size for safe uninterrupted downloads where time is divided into eternally looping periods of QSTATE: AWAKEN and QSTATE: SLEEPING. Before lemma of a launch of a binary, wget is in undefined state. When launched, wget is in AWAKEN state: after some init. When the size unit exists and is related to bytes, time periods are determined by bytes. This description may change. --quant-time-period=T is used for time period. This description may change.

--enforce-strict-download-quotas kills the download when the --quota bytecount is reached. i think this option should not be implemented, since this must better be performed with `kill' command. i will not implement this option; my head will be aching forever and very, very often and extremely painfully if i implement. Killing forests is not safe.

and there are ternary computers... (being currently actively developed in Russia on a public site.) think about them wrt GNU. --- and induction: 2 (bw), 3 (-0+), 4(0&alpha;&beta;&gamma;), 5 (0&alpha;&beta;&gamma;&delta;), induction.

Evgeniy Philippov <molchuvka>
Sun 20 Dec 2009 02:41:47 AM UTC, comment #8:

--quantum-configuration may be repeatable option (i.e. may be used multiple times).

--quantum-configuration=enforce-strict-download-quotas is the current work. AFAIR `quota' option is useful for bytecount.

Evgeniy Philippov <molchuvka>
Sun 20 Dec 2009 01:46:58 AM UTC, comment #7:

The last patch will be a guide to create a new patch which includes option `--quantum-configuration'. And does not include '--hard-quota'. Hard-quota is against my beliefs currently and maybe completely, I don't know.

Evgeniy Philippov <molchuvka>
Tue 01 Dec 2009 08:15:32 PM UTC, comment #6:

attached patch v003 received very little testing. will test more.

(file #19179)

Evgeniy Philippov <molchuvka>
Tue 01 Dec 2009 01:41:29 PM UTC, comment #5:

i am restarting the work on this patch, cloning the hg rep... -evgenii aka molchuvka

Evgeniy Philippov <molchuvka>
Mon 12 Oct 2009 12:17:47 AM UTC, comment #4:

Thanks for the update, Evgenii.

Micah Cowan <micahcowan>
Sun 11 Oct 2009 01:34:46 PM UTC, comment #3:

This patch is definitely not ready. It has problems with function return values and printed stdout/stderr messages and possibly wget program exit codes.

This patch must be reworked. It cannot be released in its current state!

-Evgenii Philippov

Wed 09 Sep 2009 07:16:25 PM UTC, comment #2:

That's http://article.gmane.org/gmane.comp.web.wget.general/8955 sorry

Micah Cowan <micahcowan>
Wed 09 Sep 2009 07:15:53 PM UTC, comment #1:

Initial patch posted at

Micah Cowan <micahcowan>
Fri 06 Jul 2007 09:59:29 PM UTC, original submission:
Micah Cowan <micahcowan>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #22298:  5.diff added by molchuvka (15KiB - 5.diff)
file #22170:  4.diff added by None (15KiB - text/x-patch)
file #19179:  hard-quota-patch-v003.diff added by molchuvka (13KiB - text/x-patch - patch against the current hg mainline)
file #18693:  hard-quota-patch-v002.diff added by None (7KiB - text/x-patch - v002 of initial patch - do not use the old version)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by molchuvka (Posted a comment)
  • -unavailable- added by micahcowan (Patch contributor.)
  • -unavailable- added by micahcowan (Submitted the item)

    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 27 Dec 2010 07:00:20 PM UTCmolchuvkaAttached File-=>Added 5.diff, #22298
    Fri 10 Dec 2010 03:17:06 AM UTCNoneAttached File-=>Added 4.diff, #22170
    Mon 21 Dec 2009 02:31:29 AM UTCmicahcowanStatusConfirmed=>Awaiting Approval
    Tue 01 Dec 2009 08:15:32 PM UTCmolchuvkaAttached File-=>Added hard-quota-patch-v003.diff, #19179
    Mon 12 Oct 2009 12:17:47 AM UTCmicahcowanPatch IncludedNone=>No
    Thu 10 Sep 2009 06:29:44 AM UTCNoneAttached File-=>Added hard-quota-patch-v002.diff, #18693
    Wed 09 Sep 2009 07:15:53 PM UTCmicahcowanStatusNone=>Confirmed
      Planned Release1.15=>1.14
      Carbon-Copy-=>Added -unavailable-
    Tue 24 Feb 2009 06:03:33 AM UTCmicahcowanWork RequiredNone=>0 - Hours
    Fri 20 Jul 2007 03:45:12 AM UTCmicahcowanPlanned ReleaseNone=>1.15

    Back to the top

    Powered by Savane 3.1-cleanup1