[Bug-wget] [bug #48193] Build fails unless -liconv set explicitly in LDFLAGS

2017-02-11 Thread Charles
Follow-up Comment #11, bug #48193 (project wget):

This is not fixed as of 1.19.1.  I just tried building it on macOS 10.12.3 and
got the exact error that initiated this thread.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/




[Bug-wget] Wget 1.19.1 released

2017-02-11 Thread Tim Rühsen
Hello,

we are pleased to announce the new version of GNU wget 1.19.1.

This is mostly a bug fix release for 1.19.
One new option --retry-on-http-error has been added.

Many thanks go to all the contributors and list activists !

Contributors (from the git log):
Axel Reinhold
Dagobert Michelsen
Tim Rühsen
Tom Szilagyi
Yousong Zhou
Zhiming Wang


The new version is available for download here:

https://ftp.gnu.org/gnu/wget/wget-1.19.1.tar.gz
https://ftp.gnu.org/gnu/wget/wget-1.19.1.tar.xz

and the GPG detached signatures using the key 0x08302DB6A2670428:

https://ftp.gnu.org/gnu/wget/wget-1.19.1.tar.gz.sig
https://ftp.gnu.org/gnu/wget/wget-1.19.1.tar.xz.sig

To reduce load on the main server, you can use this redirector service
which automatically redirects you to a mirror:

http://ftpmirror.gnu.org/wget/wget-1.19.1.tar.gz
http://ftpmirror.gnu.org/wget/wget-1.19.1.tar.xz


Noteworthy changes:

* Fix bugs, a regression, portability/build issues

* Add new option --retry-on-http-error


Please report any problem you may experience to the bug-wget@gnu.org
mailing list.

For the maintainers of Wget,
Tim

signature.asc
Description: This is a digitally signed message part.


Re: [Bug-wget] [PATCH] Add support for --retry-on-http-error

2017-02-11 Thread Tim Rühsen
Hi Tom,

On Freitag, 10. Februar 2017 22:04:31 CET Tom Szilagyi wrote:
> Hi Tim,
> 
> Thank you for the review comments. Please find attached a new version
> of the patch prepared according to your guidance. I found it easier to
> use plain old strchr instead of strchrnul, I hope that is OK.

Applied your patch. Thanks for your contribution !

Regards, Tim

> 
> Thanks,
> Tom
> 
> On Thu, Feb 09, 2017 at 09:38:26PM +0100, Tim Rühsen wrote:
> > Hi Tom,
> > 
> > thanks for your work and for signing the FSF copyright assignment !
> > 
> > Just some smallish things:
> > 
> > - Please amend the commit message to be in GNU style (see 'git log' for
> > examples). The easiest for us maintainers is when you create the patch
> > with
> > 'git format-patch -1' and add it as attachment.
> > 
> > - Please add a space between function name and (
> > 
> > - Please use xfree instead of free
> > 
> > - Could you amend check_retry_on_http_error so that no memory allocation
> > is
> > used ? E.g. using a strchrnul () loop to separate the status codes.
> > 
> > - There is a function 'cleanup' in src/init.c to free allocated stuff (if
> > DEBUG_MALLOC is defined). Please free opt.retry_on_http_error there.
> > 
> > Regards, Tim
> > 
> > On Montag, 6. Februar 2017 20:42:29 CET Tom Szilagyi wrote:
> > > Consider given HTTP response codes as non-fatal, transient errors.
> > > Supply a comma-separated list of 3-digit HTTP response codes as
> > > argument. Useful to work around special circumstances where retries
> > > are required, but the server responds with an error code normally not
> > > retried by Wget. Such errors might be 503 (Service Unavailable) and
> > > 429 (Too Many Requests). Retries enabled by this option are performed
> > > subject to the normal retry timing and retry count limitations of
> > > Wget.
> > > 
> > > Using this option is intended to support special use cases only and is
> > > generally not recommended, as it can force retries even in cases where
> > > the server is actually trying to decrease its load. Please use it
> > > wisely and only if you know what you are doing.
> > > 
> > > Example use and a starting point for manual testing:
> > >   wget --retry-on-http-error=429,503 http://httpbin.org/status/503
> > > 
> > > ---
> > > 
> > >  doc/wget.texi | 15 +++
> > >  src/http.c| 29 +
> > >  src/init.c|  1 +
> > >  src/main.c|  1 +
> > >  src/options.h |  1 +
> > >  5 files changed, 47 insertions(+)
> > > 
> > > diff --git a/doc/wget.texi b/doc/wget.texi
> > > index 8e57aaa..00a8d4b 100644
> > > --- a/doc/wget.texi
> > > +++ b/doc/wget.texi
> > > @@ -1718,6 +1718,21 @@ some few obscure servers, which never send HTTP
> > > authentication challenges, but accept unsolicited auth info, say, in
> > > addition to form-based authentication.
> > > 
> > > +@item --retry-on-http-error=@var{code[,code,...]}
> > > +Consider given HTTP response codes as non-fatal, transient errors.
> > > +Supply a comma-separated list of 3-digit HTTP response codes as
> > > +argument. Useful to work around special circumstances where retries
> > > +are required, but the server responds with an error code normally not
> > > +retried by Wget. Such errors might be 503 (Service Unavailable) and
> > > +429 (Too Many Requests). Retries enabled by this option are performed
> > > +subject to the normal retry timing and retry count limitations of
> > > +Wget.
> > > +
> > > +Using this option is intended to support special use cases only and is
> > > +generally not recommended, as it can force retries even in cases where
> > > +the server is actually trying to decrease its load. Please use it
> > > +wisely and only if you know what you are doing.
> > > +
> > > 
> > >  @end table
> > >  
> > >  @node HTTPS (SSL/TLS) Options, FTP Options, HTTP Options, Invoking
> > > 
> > > diff --git a/src/http.c b/src/http.c
> > > index 3c3c8b2..6822bee 100644
> > > --- a/src/http.c
> > > +++ b/src/http.c
> > > @@ -3982,6 +3982,30 @@ gethttp (const struct url *u, struct url
> > > *original_url, struct http_stat *hs, return retval;
> > > 
> > >  }
> > > 
> > > +/* Check whether the supplied HTTP status code is among those
> > > +   listed for the --retry-on-http-error option. */
> > > +static bool
> > > +check_retry_on_http_error (const int statcode)
> > > +{
> > > +  if (!opt.retry_on_http_error)
> > > +return false;
> > > +
> > > +  bool ret = false;
> > > +  char * retry_conf = strdup(opt.retry_on_http_error);
> > > +  char * tok = strtok(retry_conf, ",");
> > > +  while (tok)
> > > +{
> > > +  if (atoi(tok) == statcode)
> > > +{
> > > +  ret = true;
> > > +  break;
> > > +}
> > > +  tok = strtok(NULL, ",");
> > > +}
> > > +  free(retry_conf);
> > > +  return ret;
> > > +}
> > > +
> > > 
> > >  /* The genuine HTTP loop!  This is the part where the retrieval is
> > >  
> > > retried, and retried, and retried, and...  */
> > >  
> > >  uerr_t
> > > 
> >