Re: wget and ipv6 (1.6 beta5) serious bugs

2003-10-15 Thread Arkadiusz Miskiewicz
On Wednesday 15 of October 2003 12:11, Thomas Lussnig wrote:

 Ok this is clear, but than why become the aplication an binary IPv6
 enabled one
 if the PC have no IPv6 support ?
Because I'm using packages provided by Linux distribution which needs ipv6 
because some users are using it.

 I thought the configure script checked
 if the pc
 have IPv6 support. and yes both of the sugested workarounds would do it.
Checking at configure time if host on which I'm compiling does support 
socket(AF_INET6, ...) is stupid. It should only check if it's able to use 
getaddrinfo(), genameinfo() and so on while the code should be written in 
family independent way.

I always can compile on one host and use it on a other. Also in future there 
will be way to unload ipv6 module from Linux kernel. What then?

 But there are two problems with them.

 1. If you try to create an IPv6 socket only to check the IPv6 support i
 think this is
 like try and error that is not one of the best choice.
Yes, best choice is to write app in family independent way.

 2. DNS can support IPv6 even if the OS is not IPv6 aware. So the use of
 the DNS
 and try thorugh is also try and error, wich is acceptable since it is
 defined that you
 can try the next Adress if one does not work. But it does not check the
 return value.
What I wrote was pseudo code not real code - only to show the idea. Of course 
errors should be checked and if error  res-ai_next != NULL then try 
ai_next.

 So it retry each time if one version work or not.
There is also AI_ADDRCONFIG option which causes that getaddrinfo() returns 
only these families which are supported by the system.

 3. The major problem is that on such IPv4 only system. Even the parser
 should complain
 about an unsupported Adress in the url if there an IPv6 is specified.
No. On such system connection to ipv6 host is not possible and that is what 
should be in error message. ,,Familly not supported'' and try ai-next then.

The keyword for ipv6 things is ,,family independent'' rather than ,,ipv6 
ready''.

 Cu Thomas

-- 
Arkadiusz MikiewiczCS at FoE, Wroclaw University of Technology
arekm.pld-linux.org AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux



Error in wget-1.9-b5.zip

2003-10-15 Thread David Drobny
Error in wget-1.9-b5.zip

Na co dvat draz pi zkuebn jzd? 
http://ad2.seznam.cz/redir.cgi?instance=62696%26url=http://www.auto-plus.cz/faq.phpattachment: W2a.bat
--17:46:21--  http://www.digitalplayground.com/freepage.php?tgpid=008drefid=393627
   = `/tmp2/www.digitalplayground.com/[EMAIL PROTECTED]refid=393627'
Resolving www.digitalplayground.com... 64.38.205.100
Connecting to www.digitalplayground.com[64.38.205.100]:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://www.yourworstenemy.com?tgpid=008drefid=393627 [following]
--17:46:23--  http://www.yourworstenemy.com/?tgpid=008drefid=393627
   = `/tmp2/www.yourworstenemy.com/[EMAIL PROTECTED]refid=393627'
Resolving www.yourworstenemy.com... failed: Unknown error.

FINISHED --17:46:36--
Downloaded: 0 bytes in 0 files
Converted 0 files in 0.00 seconds.


Re: Error in wget-1.9-b5.zip

2003-10-15 Thread Hrvoje Niksic
Unfortunately, I don't know what the problem is here.  Perhaps some of
the Windows people can take over this one?


Re: Error in wget-1.9-b5.zip

2003-10-15 Thread Gisle Vanem
 Error in wget-1.9-b5.zip

wget cannot find the host. Turn on -d option and observe:

Location: http://www.yourworstenemy.com?tgpid=008drefid=393627 [following]
Closing fd 1952
--13:38:35--  http://www.yourworstenemy.com/?tgpid=008drefid=393627
   = `tmp2/www.yourworstenemy.com/[EMAIL PROTECTED]refid=393627'
Resolving www.yourworstenemy.com... seconds 0.00, failed: Host not found.

--gv





RE: Error in wget-1.9-b5.zip

2003-10-15 Thread Herold Heiko
Seems more a DNS issue of that domain to me, at least here and now. That
page redirects to www.yourworstenemy.com which doesn't resolve:

whois www.yourworstenemy.com
Registrant:
HUMMEL, GREG (YOURWORSTENEMY-DOM)
...
  Domain servers in listed order:

   NS1.BEST.COM 128.121.101.11
   NS2.BEST.COM 161.58.9.11
   NS3.BEST.COM 128.121.101.19

dig @ns1.best.com www.yourworstenemy.com A

;  DiG 2.2  @ns1.best.com www.yourworstenemy.com A
; (1 server found)
;; res options: init recurs defnam dnsrch
;; got answer:
;; -HEADER- opcode: QUERY, status: SERVFAIL, id: 55757
;; flags: qr rd ra; Ques: 1, Ans: 0, Auth: 0, Addit: 0
;; QUESTIONS:
;;  www.yourworstenemy.com, type = A, class = IN

;; Total query time: 1001 msec
;; FROM: ns to SERVER: ns1.best.com  128.121.101.11
;; WHEN: Wed Oct 15 14:46:06 2003
;; MSG SIZE  sent: 40  rcvd: 40

in other words, no answer. If you prefer:

c:\nslookup
..
 server ns1.best.com
Server predefinito:  ns1.best.com
Address:  128.121.101.11

 www.yourworstenemy.com.
Server:  ns1.best.com
Address:  128.121.101.11

*** ns1.best.com non trova www.yourworstenemy.com.: Server failed

Heiko

-- 
-- PREVINET S.p.A. www.previnet.it
-- Heiko Herold [EMAIL PROTECTED]
-- +39-041-5907073 ph
-- +39-041-5907472 fax

 -Original Message-
 From: Hrvoje Niksic [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 15, 2003 2:22 PM
 To: David Drobny
 Cc: [EMAIL PROTECTED]
 Subject: Re: Error in wget-1.9-b5.zip
 
 
 Unfortunately, I don't know what the problem is here.  Perhaps some of
 the Windows people can take over this one?
 


Re: Error in wget-1.9-b5.zip

2003-10-15 Thread Hrvoje Niksic
Gisle Vanem [EMAIL PROTECTED] writes:

 Error in wget-1.9-b5.zip

 wget cannot find the host. Turn on -d option and observe:

 Location: http://www.yourworstenemy.com?tgpid=008drefid=393627 [following]
 Closing fd 1952
 --13:38:35--  http://www.yourworstenemy.com/?tgpid=008drefid=393627
= `tmp2/www.yourworstenemy.com/[EMAIL PROTECTED]refid=393627'
 Resolving www.yourworstenemy.com... seconds 0.00, failed: Host not found.

Note that David's Wget seems to have printed unknown error, not
Host not found.  Is that an artifact of his version of system
libraries, or is Wget doing something wrong?


Re: Error in wget-1.9-b5.zip

2003-10-15 Thread Gisle Vanem
Hrvoje Niksic [EMAIL PROTECTED] said:

 Note that David's Wget seems to have printed unknown error, not
 Host not found.  Is that an artifact of his version of system
 libraries, or is Wget doing something wrong?

I don't know how/when Windows could print anything else 
what's already in herrmsg(): HOST_NOT_FOUND, NO_RECOVERY
NO_DATA, NO_ADDRESS or TRY_AGAIN. 
Should maybe print the error-number otherwise.

--gv



Re: Error in wget-1.9-b5.zip

2003-10-15 Thread Gisle Vanem
Hrvoje Niksic [EMAIL PROTECTED] said:

 Note that David's Wget seems to have printed unknown error, not
 Host not found.  Is that an artifact of his version of system
 libraries, or is Wget doing something wrong?

That's because wget incorrectly uses strerror() for Winsock
errors or uses 'errno' when that's not set. The correct thing would be 
to set 'errno' to last Winsock error and make a compatible function 
that returns correct string for both sys-errors and WS errors. 
E.g. we put this in mswindows.h:
  #define strerror(err) win_strerror (err)
  extern const char*win_strerror (int err);  

But the problem is that sys_errlist[] always returns English texts, but
Windows's FormatMessage() returns in native language. So to be 
consistent, I suggest we return English also for Winsock errors (easier 
when we receive a bug-report from a user without the proper wget.gmo file.
Who ever uses NLS anyway?).

I could commit a patch if we agree on this.

--gv



Re: Error in wget-1.9-b5.zip

2003-10-15 Thread Hrvoje Niksic
Gisle Vanem [EMAIL PROTECTED] writes:

 And anyway, aren't Winsock functions supposed to set errno?  If they
 don't, how does Wget report connection refused, to name but one
 example?  Wget relies on errno/strerror pretty heavily, and if that
 were non-functional in such an obvious way, I'm sure someone would
 have complained by now.

 Winsock (with MingW/MSVC/Watcom/DMC) does *not* set errno. How Wget
 on Windows could say connection refused I don't know. Sure it
 wasn't a CygWin version that said that?

I have no idea, I haven't tried it yet under Windows.  I just assumed
that, if it were broken, someone would have reported it by now.  I
could easily have been wrong...

 If you mean gettext should translate strerror() strings,

I didn't mean that.  libc should translate strerror() strings.  If it
doesn't do that, we simply don't care.  I misunderstood your statement
about strerror only returning sys_errlist entries to refer to Unix
strerror.

I guess we should stick to English messages after all.  The gettext
mechanism that Wget uses is probably almost impossible to map to the
Windows localization model, which means that something like LANG=de
wget would not work as intended.  (It would print German messages,
*except* for errors which would on my box be printed in Croatian.)