[bug #59954] wget assumes ftp server of type UNIX knows LIST -a command while this is not always true

2021-01-31 Thread Tim Ruehsen
Follow-up Comment #3, bug #59954 (project wget):

So most servers either support -a or ignore it and still return a directory
listing (tested your examples).

> Maybe wget could fallback to LIST (without -a) when there is no parsed
result in the output, too?

I agree that this seems to be the most sensible way.


___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[bug #59954] wget assumes ftp server of type UNIX knows LIST -a command while this is not always true

2021-01-31 Thread Tim Ruehsen
Update of bug #59954 (project wget):

  Status:   Inspected => Confirmed  


___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[bug #59954] wget assumes ftp server of type UNIX knows LIST -a command while this is not always true

2021-01-31 Thread Arkadiusz Miskiewicz
Follow-up Comment #2, bug #59954 (project wget):

That ftp server interprets "-a" as file/directory argument and tries to list
that.

Doesn't seem to be uncommon for ftp servers to do not return error on LIST on
not existing files/directories.

But it is uncommon to not support "-a", that's why this problem doesn't occur
so often with wget.

ftp.ubuntu.com - returns success (226) but sends empty list when trying to
list not-existing directory
ftp.redhat.com - the same
ftp.pureftpd.org - the same
ftp.wayne.edu - the same
ftp.netbsd.org - the same

ftp.proftpd.com - returns error 450

so only one from above actually returns error. Fortunately all above support
"-a" which makes this problem "hidden".


Maybe wget could fallback to LIST (without -a) when there is no parsed result
in the output, too?


Don't have strong opinion about this but clearly almost no server returns
error on non existing file/directory (which is "-a" file/directory in reported
case as server doesn't support "-a" option).

 

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[bug #59954] wget assumes ftp server of type UNIX knows LIST -a command while this is not always true

2021-01-31 Thread Tim Ruehsen
Update of bug #59954 (project wget):

  Status:None => Inspected  
 Assigned to:None => rockdaboot 

___

Follow-up Comment #1:

Wget always tries 'LIST -a' first. If the server returns an error, wget tries
'LIST' as a fallback.

In your case, the server indicates an OK (226 Transfer complete) and puts a
custom message as payload. This is good to be parsed by a human, but not by a
program that relies on proper success/error codes.

IMO, this is clearly a server issue and should be reported there.


___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




Re: texi2pod.pl changes '' to " even in verbatim text, e.g. example

2021-01-31 Thread Tim Rühsen

Hi,

On 26.01.21 15:19, Vincent Lefevre wrote:

Hi,

In texi2pod.pl from wget 1.21:

 # Change double single quotes to double quotes.
 s/''/"/g;
 s/``/"/g;

This seems to be done unconditionally. But this is incorrect in
verbatim text, such as

@example
wget -X '' -X /~nobody,/~somebody
@end example

Thus one ends up with

 wget -X " -X /~nobody,/~somebody

in the wget.pod file, and the man page is affected too, since it is
obtained from wget.pod.



Just found this single occurrence and replaced '' with "" in doc/wget.texi.

Thanks for reporting.

Regards, Tim



OpenPGP_signature
Description: OpenPGP digital signature


Re: --wait interrupted on SIGWINCH; nanosleep not used

2021-01-31 Thread Tim Rühsen

Hi Felix,

On 25.01.21 17:28, Felix Dietrich wrote:

Hello,

I noticed that wget does interrupt its --wait between retrieval of
multiple files when my terminal window gets resized.  Reading through
the sources it seems that the “xsleep” function (in utils.c) only
supports the continuation of interrupted sleeps when the system provides
a nanosleep function, which mine do, and the appropriate code is enabled
when HAVE_NANOSLEEP is defined – but HAVE_NANOSLEEP does not appear to
still get defined anywhere.  Previously, it was AC_DEFINEd by a custom
macro WGET_NANOSLEEP which was removed with [1] when instead Gnulib’s
nanosleep module was added.  The nanosleep module, though, only sets the
shell variable HAVE_NANOSLEEP and AC_SUBST it (via time.h.m4): it does
not define a macro for the C preprocessor.  This means that nanosleep is
not used anymore, anywhere, even on systems that would support it.

 From here I am uncertain how to continue:

   - Has the fallback code to “usleep” and select become obsolete and
 should simply be removed from “xselect” as Gnulib takes care of the
 compatibility?  (In this case the members of “struct timespec
 remaining”, probably, need to be initialised to 0 and checked before
 restarting nanosleep: the Gnulib’s fallback implementation does not
 appear to use or set it when interrupted.)

   - Should HAVE_NANOSLEEP be AC_DEFINEd again?

   - Maybe something else?

So far, hopefully, I have analysed the issue correctly.


Thanks for looking into it !
Option 1 (fallback code is obsolete) seems to be appropriate.

Can you test that e.g. by adding
  #define HAVE_NANOSLEEP 1
to src/config.h and then rebuild with
  make clean && make
?

The mentioned commit [1] should have removed the fallback code and the 
'#ifdef HAVE_NANOSLEEP'.


If you confirm the feature working again when built with the above 
instructions, I am going to fix the code appropriately.


Regards, Tim




[1] Commit: a384f5e2e9afd11e363d011b474c2e5da5573103





OpenPGP_signature
Description: OpenPGP digital signature


Re: consult about make check

2021-01-31 Thread Tim Rühsen

On 25.01.21 10:00,  wrote:

Dear Sir,


After making without error message, I used the command "make check" to check. There 
are 6 items failed as follows. Is there any program on my pc (Red Hat Enterprise 
Linux Server release 6.2) absent?


Likely the gnutls-devel package is missing (or openssl-devel if you 
build with that).


If it still doesn't work, send your config.log (generated by 
./configure) and I'll take a look.


Best Regards, Tim





Best regards,
Caihong Zhang







FAIL: Test-hsts.py

FAIL: Test--https.py
FAIL: Test--https-crl.py
PASS: Test-missing-scheme-retval.py
PASS: Test-O.py
FAIL: Test-pinnedpubkey-der-https.py
FAIL: Test-pinnedpubkey-der-no-check-https.py
FAIL: Test-pinnedpubkey-hash-https.py
FAIL: Test-pinnedpubkey-hash-no-check-fail-https.py
FAIL: Test-pinnedpubkey-pem-fail-https.py
FAIL: Test-pinnedpubkey-pem-https.py
PASS: Test-Post.py
PASS: Test-recursive-basic.py
PASS: Test-recursive-include.py
PASS: Test-recursive-redirect.py
PASS: Test-redirect.py
PASS: Test-redirect-crash.py
PASS: Test--rejected-log.py
PASS: Test-reserved-chars.py
PASS: Test--spider-r.py

Testsuite summary for wget 1.20.3

# TOTAL: 44
# PASS: 35
# SKIP: 0
# XFAIL: 0
# FAIL: 9
# XPASS: 0
# ERROR: 0

bug-wget@gnu.org





OpenPGP_signature
Description: OpenPGP digital signature


[bug #58050] Incorrect timeout handling when tls transport is registered

2021-01-31 Thread Tim Ruehsen
Follow-up Comment #3, bug #58050 (project wget):

Fixed by
https://git.savannah.gnu.org/cgit/wget.git/commit/?id=7a3a82faf86eab6c1f0c453de1923f8a1e0f4706

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[bug #58050] Incorrect timeout handling when tls transport is registered

2021-01-31 Thread Tim Ruehsen
Update of bug #58050 (project wget):

  Status:None => Fixed  
 Assigned to:None => rockdaboot 
 Open/Closed:Open => Closed 
   Fixed Release:None => 1.20   


___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/