Re: Error in wget-1.9-b5.zip
"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.)
Re: Error in wget-1.9-b5.zip
"Hrvoje Niksic" <[EMAIL PROTECTED]> said: > Doesn't the host lookup code use herrmsg()? I was thinking mostly of 'errno' in conjuction with connect(). > 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? > > But the problem is that sys_errlist[] always returns English texts, > > That's not true. strerror() is more than just an index into > sys_errlist -- don't be confused by what you see in cmpt.c, that's > just for ancient systems without strerror. In non-English locales > with translated error messages, Wget prints the translated ones. > Which is how it should be, really. MSVC's (and hence MingW''s) strerror() is that simple. MS seems to think some ANSI functions are deprecated; use the core API instead. E.g. I've never been able to get anything but localised time- formats from setlocale (LC_ALL,"norwegian"). It doesn't make any difference on strerror() (Yet I use Norwegian Win-XP). If you mean gettext should translate strerror() strings, how can it know what all the Win compilers will return? (Watcom/DMC doesn't link to MSCVRT.DLL as MSVC/MingW do so that would make 3 sets of lists). > I'd like to go the other way with consistency: use gettext in Windows > builds! Agree, but then few users are bothered with of gettext. The .po files also have a tendendcy to lag behind. The important thing is that Wget report a suitable error (not "Unknown error") when it can. Hence my proposed setting of 'errno' and 'win_strerror()' function. --gv
Re: Error in wget-1.9-b5.zip
"Gisle Vanem" <[EMAIL PROTECTED]> writes: > "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. Doesn't the host lookup code use herrmsg()? 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. > 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); That's fine, but I'd rather not do that unless I absolutely have to. > But the problem is that sys_errlist[] always returns English texts, That's not true. strerror() is more than just an index into sys_errlist -- don't be confused by what you see in cmpt.c, that's just for ancient systems without strerror. In non-English locales with translated error messages, Wget prints the translated ones. Which is how it should be, really. > but Windows's FormatMessage() returns in native language. So to be > consistent I'd like to go the other way with consistency: use gettext in Windows builds! > 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?). Well, as Francois Pinard once put it, computers speak entirely too much English. While I personally prefer English interfaces, I like giving the users the choice to make their applications speak in their language. But translations shouldn't be imposed on users who don't want them. I'd say, *if* the user has set up Wget to use her language, also provide translated error messages (if possible). Otherwise, use English, as always. If a user submits a bug report in a foreign language that we can't decipher, we'll kindly ask her to resubmit the report with LANG unset -- or however you do that kind of thing in Windows. I don't believe it will happen often.
Re: Error in wget-1.9-b5.zip
"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
Please remove me from the mailing list
Please remove me from the mailing list
Re: Error in wget-1.9-b5.zip
"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
"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=008d&refid=393627 [following] > Closing fd 1952 > --13:38:35-- http://www.yourworstenemy.com/?tgpid=008d&refid=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
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
> Error in wget-1.9-b5.zip wget cannot find the host. Turn on -d option and observe: Location: http://www.yourworstenemy.com?tgpid=008d&refid=393627 [following] Closing fd 1952 --13:38:35-- http://www.yourworstenemy.com/?tgpid=008d&refid=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
Unfortunately, I don't know what the problem is here. Perhaps some of the Windows people can take over this one?
Error in wget-1.9-b5.zip
Error in wget-1.9-b5.zip Na co dávat důraz při zkušební jízdě? http://ad2.seznam.cz/redir.cgi?instance=62696%26url=http://www.auto-plus.cz/faq.php<> --17:46:21-- http://www.digitalplayground.com/freepage.php?tgpid=008d&refid=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=008d&refid=393627 [following] --17:46:23-- http://www.yourworstenemy.com/?tgpid=008d&refid=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: wget and ipv6 (1.6 beta5) serious bugs
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 MiśkiewiczCS at FoE, Wroclaw University of Technology arekm.pld-linux.org AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux