Bug 131427 - [patch] Add to fetch(1) an ability to limit a number of auto-retries
Summary: [patch] Add to fetch(1) an ability to limit a number of auto-retries
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 8.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dag-Erling Smørgrav
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2009-02-05 19:20 UTC by Alexander Gromnitsky
Modified: 2022-10-17 12:34 UTC (History)
1 user (show)

See Also:


Attachments
fetch.patch (2.75 KB, patch)
2009-02-05 19:20 UTC, Alexander Gromnitsky
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Gromnitsky 2009-02-05 19:20:03 UTC
fetch(1) has got a special `-a' option that allows automatically
retrying a transfer upon soft failures. But if, for example, a server
returns HTTP error "403 Permission Denied", fetch(1) will loop forever
trying to repeat the request.

It's useful to have an opportunity to control such behaviour.

How-To-Repeat: % fetch -a http://foobar.com
fetch: http://foobar.com: Forbidden
fetch: http://foobar.com: Forbidden
fetch: http://foobar.com: Forbidden
fetch: http://foobar.com: Forbidden
fetch: http://foobar.com: Forbidden
^Cfetch: transfer interrupted

With a new `-e' option we can limit a number of retries:

% fetch -e 2 http://foobar.com
fetch: http://foobar.com: Forbidden
fetch: http://foobar.com: Forbidden
fetch: http://foobar.com: Forbidden
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:34:03 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>