Re: NTLM authentication in wget

2003-09-09 Thread Daniel Stenberg
On Mon, 8 Sep 2003, Wayne Eisenberg wrote:

 I think it must have something to do with NTLM authentication in IIS 5.0,
 but here's the debug output:

[snip]

 Date: Tue, 09 Sep 2003 09:14:34 GMT
 WWW-Authenticate: Negotiate
 WWW-Authenticate: NTLM
 Content-Length: 4431
 Content-Type: text/html

This is NTLM required, indeed.

 Does anyone have any ideas on what's wrong and how to fix it (if possible)?

The problem is that wget doesn't support NTLM. The fix is to implement it.

A work-around would be to get a recent curl release, as it supports NTLM.

-- 
 -=- Daniel Stenberg -=- http://daniel.haxx.se -=-
  ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol


Re: IPv6 detection in configure

2003-09-09 Thread Hrvoje Niksic
Daniel Stenberg [EMAIL PROTECTED] writes:

 These are two snippets that can be used to detect IPv6 support and a
 working getaddrinfo() info. Adjust as you see fit!

Thanks a bunch!  I'll try it out later today.


Re: upcoming new wget version

2003-09-09 Thread DervishD
Hi Jochen :)

 * Jochen Roderburg [EMAIL PROTECTED] dixit:
 Question: Is the often discussed *feature* in version 1.8.x meanwhile 
 repaired, that special characters in local filenames are url-encoded?
 That was the main reason for me that I never started using that version ;-)

And that is the only wget bug that keeps hitting me again and
again :((( specially when I download files with spaces in it. I
posted a complete and detailed bug report a couple of months ago.

Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net  http://raul.pleyades.net/


Enhancement request

2003-09-09 Thread Peter Weiss
Hello!

I am using wget 1.8.2 and I find it very useful from time to time to get large 
files from http servers due to better error handling and interrupted 
downloads.

What I *really* miss in the program is the ability to support the rtsp 
protocol!

If wget would support rtsp too (additonally to http and ftp) this would be a 
really great enhancement. In case the program gets too large one can 
introduce a new program like rtspget as little sister of the famous wget.


CU
Peter Weiss



Re: upcoming new wget version

2003-09-09 Thread Hrvoje Niksic
Jochen Roderburg [EMAIL PROTECTED] writes:

 Question: Is the often discussed *feature* in version 1.8.x meanwhile
 repaired, that special characters in local filenames are
 url-encoded?

Hmm, that was another thing scheduled to be fixed for 1.9.


Windows filename patch

2003-09-09 Thread Herold Heiko
Hrvoje,

could you please check the thread Windows filename patch for 1.8.2 from
around 24-05-2002 (Hack Kampbjørn, Ian Abbott) ?
That patch (url.c) got committed to the 1.8 branch but not to the 1.9
branch.
Also, it is comprised of two parts, the first one:

@@ -1273,7 +1273,12 @@
   if (u-port != scheme_default_port (u-scheme))
{
  int len = strlen (dirpref);
+#if WINDOWS || __CYGWIN__
+ /* Use '_' instead of ':' here for Windows. */
+ dirpref[len] = '_';
+#else
  dirpref[len] = ':';
+#endif
  number_to_string (dirpref + len + 1, u-port);
}
 }

should still apply cleanly to url.c around line 1406, but I'm not sure where
the other part:

   if (query  to - result  sizeof (result))
 {
+#if WINDOWS || __CYGWIN__
+  /* Temporary fix.  Use '@' instead of '?' here for Windows. */
+  *to++ = '@';
+#else
   *to++ = '?';
+#endif
 
   /* Copy QUERY to RESULT and encode all '/' characters. */
   from = query;

should go now, or even if it is still needed. At that time Hack said:

 When generating filenames from URLs with queries, Wget puts a '?'
 character in the filename, which is an illegal filename character for
 Windows.  This patch changes that character to '@' when compiled for
 Windows.


Heiko

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


Re: Windows filename patch

2003-09-09 Thread Hrvoje Niksic
Herold Heiko [EMAIL PROTECTED] writes:

 could you please check the thread Windows filename patch for 1.8.2
 from around 24-05-2002 (Hack Kampbjørn, Ian Abbott) ?  That patch
 (url.c) got committed to the 1.8 branch but not to the 1.9 branch.
 Also, it is comprised of two parts, the first one:

Part of the reason it wasn't applied was that I wanted to fix the
problem properly for 1.9.  I guess I could apply your patch now and
remove it if/when the proper fix is in place.


RE: Windows filename patch

2003-09-09 Thread Herold Heiko
 -Original Message-
 From: Hrvoje Niksic [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 09, 2003 3:00 PM
 To: Herold Heiko
 Cc: [EMAIL PROTECTED]; 'Hack Kampbjørn'
 Subject: Re: Windows filename patch
 
 
 Herold Heiko [EMAIL PROTECTED] writes:
 
  could you please check the thread Windows filename patch for 1.8.2
  from around 24-05-2002 (Hack Kampbjørn, Ian Abbott) ?  That patch
  (url.c) got committed to the 1.8 branch but not to the 1.9 branch.
  Also, it is comprised of two parts, the first one:
 
 Part of the reason it wasn't applied was that I wanted to fix the
 problem properly for 1.9.  I guess I could apply your patch now and
 remove it if/when the proper fix is in place.
 

Not mine, but I agree, a temporary fix is better than nothing, without that
one currently files are lost.

Heiko

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


Re: rfc2732 patch for wget

2003-09-09 Thread Hrvoje Niksic
Mauro Tortonesi [EMAIL PROTECTED] writes:

 On Mon, 8 Sep 2003, Post, Mark K wrote:

 Absolutely.  I would much rather get an intelligent error message
 stating that ipv6 addresses are not supported, versus a misleading
 one about the host not being found.  That would save end-users a
 whole lot of wasted time.

 i agree here.

OK then.  Here is an additional patch:

2003-09-09  Hrvoje Niksic  [EMAIL PROTECTED]

* url.c (url_parse): Return an error if the URL contains a [...]
IPv6 numeric address and we don't support IPv6.

Index: src/url.c
===
RCS file: /pack/anoncvs/wget/src/url.c,v
retrieving revision 1.77
diff -u -r1.77 url.c
--- src/url.c   2003/09/05 20:36:17 1.77
+++ src/url.c   2003/09/09 13:02:46
@@ -649,7 +649,9 @@
   Invalid user name,
 #define PE_UNTERMINATED_IPV6_ADDRESS   5
   Unterminated IPv6 numeric address,
-#define PE_INVALID_IPV6_ADDRESS6
+#define PE_IPV6_NOT_SUPPORTED  6
+  IPv6 addresses not supported,
+#define PE_INVALID_IPV6_ADDRESS7
   Invalid IPv6 numeric address
 };
 
@@ -658,6 +660,7 @@
 *(p) = (v);\
 } while (0)
 
+#ifdef INET6
 /* The following two functions were adapted from glibc. */
 
 static int
@@ -787,8 +790,8 @@
 
   return 1;
 }
+#endif
 
-
 /* Parse a URL.
 
Return a new struct url if successful, NULL on error.  In case of
@@ -860,6 +863,7 @@
  return NULL;
}
 
+#ifdef INET6
   /* Check if the IPv6 address is valid. */
   if (!is_valid_ipv6_address(host_b, host_e))
{
@@ -869,6 +873,10 @@
 
   /* Continue parsing after the closing ']'. */
   p = host_e + 1;
+#else
+  SETERR (error, PE_IPV6_NOT_SUPPORTED);
+  return NULL;
+#endif
 }
   else
 {


Re: Help needed! How to pass XML message to webserver

2003-09-09 Thread Aaron S. Hawley
Wget doesn't currently have http file upload capabilities, but if this XML
message can be sent by cgi POST parameters then Wget could probably do it.
but you'll need to figure out how exactly the XML message is sent using
http.

/a

On Mon, 8 Sep 2003, Vasudha Chiluka wrote:

 Hi ,

 I need to pass XML message to a webserver using http.
 Could anybody tell me how I can accomplish this using wget.
 Any help is greatly appreciated..

 Thanks
 Vasudha


Re: Thank you!

2003-09-09 Thread L-Soft list server at Microsoft (1.8e)
 See the attached file for details
Unknown command - SEE. Try HELP.

Summary of resource utilization
---
 CPU time:0.000 secDevice I/O:4
 Overhead CPU:0.000 secPaging I/O:0
 CPU model: 933MHz Pentium III 256k (1152M)
 Job origin:  [EMAIL PROTECTED]


IPv6 detection in configure

2003-09-09 Thread Hrvoje Niksic
Thanks to Daniel Stenberg who has either been reading my mind or has
had the exact same needs, here is a patch that brings configure
(auto-)detection for IPv6.

Please test it out on various configurations where IPv6 is or is not
enabled.

ChangeLog:
2003-09-09  Hrvoje Niksic  [EMAIL PROTECTED]

* configure.in, aclocal.m4: Added configure check for IPv6 and
getaddrinfo.  From Daniel Stenberg.

src/ChangeLog:
2003-09-09  Hrvoje Niksic  [EMAIL PROTECTED]

* config.h.in: Initialize HAVE_GETADDRINFO and ENABLE_IPV6.

* all: Use #ifdef ENABLE_IPV6 instead of the older INET6.  Use
HAVE_GETADDRINFO for getaddrinfo-related stuff.

Index: aclocal.m4
===
RCS file: /pack/anoncvs/wget/aclocal.m4,v
retrieving revision 1.6
diff -u -r1.6 aclocal.m4
--- aclocal.m4  2003/09/04 21:29:08 1.6
+++ aclocal.m4  2003/09/09 19:25:07
@@ -86,6 +86,47 @@
   AC_MSG_RESULT(no)
 fi])
 
+dnl 
+dnl check for working getaddrinfo()
+dnl
+AC_DEFUN(WGET_CHECK_WORKING_GETADDRINFO,[
+  AC_CACHE_CHECK(for working getaddrinfo, ac_cv_working_getaddrinfo,[
+  AC_TRY_RUN( [
+#include netdb.h
+#include sys/types.h
+#include sys/socket.h
+
+int main(void) {
+struct addrinfo hints, *ai;
+int error;
+
+memset(hints, 0, sizeof(hints));
+hints.ai_family = AF_UNSPEC;
+hints.ai_socktype = SOCK_STREAM;
+error = getaddrinfo(127.0.0.1, 8080, hints, ai);
+if (error) {
+exit(1);
+}
+else {
+exit(0);
+}
+}
+],[
+  ac_cv_working_getaddrinfo=yes
+],[
+  ac_cv_working_getaddrinfo=no
+],[
+  ac_cv_working_getaddrinfo=yes
+])])
+if test x$ac_cv_working_getaddrinfo = xyes; then
+  AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if getaddrinfo exists and works])
+  AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support])
+
+  IPV6_ENABLED=1
+  AC_SUBST(IPV6_ENABLED)
+fi
+])
+
 
 # This code originates from Ulrich Drepper's AM_WITH_NLS.
 
Index: configure.in
===
RCS file: /pack/anoncvs/wget/configure.in,v
retrieving revision 1.36
diff -u -r1.36 configure.in
--- configure.in2003/09/05 19:33:44 1.36
+++ configure.in2003/09/09 19:25:09
@@ -30,7 +30,7 @@
 dnl
 
 AC_INIT(src/version.c)
-AC_PREREQ(2.12)
+AC_PREREQ(2.50)
 AC_CONFIG_HEADER(src/config.h)
 
 dnl
@@ -155,7 +155,6 @@
 AC_C_INLINE
 AC_TYPE_SIZE_T
 AC_TYPE_PID_T
-dnl  This generates a warning.  What do I do to shut it up?
 AC_C_BIGENDIAN
 
 # Check size of long.
@@ -441,6 +440,55 @@
 fi
 AC_DEFINE(HAVE_MD5)
 AC_SUBST(MD5_OBJ)
+
+dnl **
+dnl Checks for IPv6
+dnl **
+
+dnl
+dnl If --enable-ipv6 is specified, we try to use IPv6 (as long as
+dnl getaddrinfo is also present).  If --disable-ipv6 is specified, we
+dnl don't use IPv6 or getaddrinfo.  If neither are specified, we test
+dnl whether it's possible to create an AF_INET6 socket and if yes, use
+dnl IPv6.
+dnl
+
+AC_MSG_CHECKING([whether to enable ipv6])
+AC_ARG_ENABLE(ipv6,
+AC_HELP_STRING([--enable-ipv6],[Enable ipv6 support])
+AC_HELP_STRING([--disable-ipv6],[Disable ipv6 support]),
+[ case $enableval in
+  no)
+   AC_MSG_RESULT(no)
+   ipv6=no
+   ;;
+  *)   AC_MSG_RESULT(yes)
+   ipv6=yes
+   ;;
+  esac ],
+
+  AC_TRY_RUN([ /* is AF_INET6 available? */
+#include sys/types.h
+#include sys/socket.h
+main()
+{
+ if (socket(AF_INET6, SOCK_STREAM, 0)  0)
+   exit(1);
+ else
+   exit(0);
+}
+],
+  AC_MSG_RESULT(yes)
+  ipv6=yes,
+  AC_MSG_RESULT(no)
+  ipv6=no,
+  AC_MSG_RESULT(no)
+  ipv6=no
+))
+
+if test x$ipv6 = xyes; then
+  WGET_CHECK_WORKING_GETADDRINFO
+fi
 
 dnl
 dnl Set of available languages.
Index: src/config.h.in
===
RCS file: /pack/anoncvs/wget/src/config.h.in,v
retrieving revision 1.24
diff -u -r1.24 config.h.in
--- src/config.h.in 2002/05/18 02:16:19 1.24
+++ src/config.h.in 2003/09/09 19:25:32
@@ -250,6 +250,12 @@
 /* Define if we're using builtin (GNU) md5.c.  */
 #undef HAVE_BUILTIN_MD5
 
+/* Define if you have the getaddrinfo function.  */
+#undef HAVE_GETADDRINFO
+
+/* Define if you want to enable the IPv6 support.  */
+#undef ENABLE_IPV6
+
 /* First a gambit to see whether we're on Solaris.  We'll
need it below.  */
 #ifdef __sun
Index: src/connect.c
===
RCS file: /pack/anoncvs/wget/src/connect.c,v
retrieving revision 1.18
diff -u -r1.18 connect.c
--- src/connect.c   2002/05/18 02:16:19 1.18
+++ src/connect.c   2003/09/09 19:25:33
@@ -412,7 +412,7 @@
 
   switch (mysrv.sa.sa_family)
 {
-#ifdef INET6
+#ifdef ENABLE_IPV6
 case AF_INET6:
   memcpy (ip, mysrv.sin6.sin6_addr, 16);
   return 1;
Index: src/ftp-basic.c

Re: IPv6 detection in configure

2003-09-09 Thread Daniel Stenberg
On Tue, 9 Sep 2003, Hrvoje Niksic wrote:

 Thanks to Daniel Stenberg who has either been reading my mind or has had the
 exact same needs, here is a patch that brings configure (auto-)detection for
 IPv6.

Of course I read your mind, what else could it be? :-P

I'm glad it helped.

-- 
 -=- Daniel Stenberg -=- http://daniel.haxx.se -=-
  ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol


RE: wget -r -p -k -l 5 www.protcast.com doesnt pull some images t hough they are part of the HREF

2003-09-09 Thread Post, Mark K
No, it won't.  The javascript stuff makes sure of that.


Mark Post

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 09, 2003 4:32 PM
To: [EMAIL PROTECTED]
Subject: wget -r -p -k -l 5 www.protcast.com doesnt pull some images
though they are part of the HREF


Hi,
I am having some problems with  downloading  www.protcast.com.
I used  wget -r -p -k -l 5 www.protcast.com 
In www.protcast.com/Grafx files  menu-contact_(off).jpg get downloaded.
However menu-contact_(on).jpg does not get downloaded though it lies in the
same directory as the 
menu-contact_(off).jpg file.

index.html contains the following HREF 

A HREF=contact.htm
ONMOUSEOVER=msover1('m-contact','Grafx/menu-contact_(on).jpg');
ONMOUSEOUT=msout1('m-contact','Grafx/menu-contact_(off).jpg');
IMG SRC=Grafx/menu-contact_(off).jpg NAME=m-contact WIDTH=197
HEIGHT=29 BORDER=0/A

so wget should be able to see this image right?.

Please help/advice. 
bye


Re: [SPAM?:###] RE: wget -r -p -k -l 5 www.protcast.com doesnt pull some images t hough they are part of the HREF

2003-09-09 Thread Aaron S. Hawley
I, on the other hand, am actually not sure why you're not able to
have Wget find the marked up (not javascript) image.

Cause it worked for me.

% ls -l www.protcast.com/Grafx/menu-contact_\(off\).jpg
-rw---   1 ashawley usr 2377 Jan 10 2003  
www.protcast.com/Grafx/menu-contact_(off).jpg

/a

On Tue, 9 Sep 2003, Post, Mark K wrote:

 No, it won't.  The javascript stuff makes sure of that.


 Mark Post

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 09, 2003 4:32 PM
 To: [EMAIL PROTECTED]
 Subject: wget -r -p -k -l 5 www.protcast.com doesnt pull some images
 though they are part of the HREF


 Hi,
 I am having some problems with  downloading  www.protcast.com.
 I used  wget -r -p -k -l 5 www.protcast.com
 In www.protcast.com/Grafx files  menu-contact_(off).jpg get downloaded.
 However menu-contact_(on).jpg does not get downloaded though it lies in the
 same directory as the
 menu-contact_(off).jpg file.

 index.html contains the following HREF

 A HREF=contact.htm
 ONMOUSEOVER=msover1('m-contact','Grafx/menu-contact_(on).jpg');
 ONMOUSEOUT=msout1('m-contact','Grafx/menu-contact_(off).jpg');
 IMG SRC=Grafx/menu-contact_(off).jpg NAME=m-contact WIDTH=197
 HEIGHT=29 BORDER=0/A

 so wget should be able to see this image right?.

 Please help/advice.
 bye


Maybe a bug in wget?

2003-09-09 Thread n_fujikawa
Dear Sir;

 We are using wget-1.8.2 and it's very convinient for our routine
program.  By the way, now we have a trouble with the return code
from wget in case of trying to use it with -r option,  When wget with
-r option fails in a ftp connection, wget returns a code 0.  If no -r
option,  it returns a code 1.  We look over source programs, and find
a suspicious line in ftp.c.

ftp.c

 +1699if ((opt.ftp_glob  wild) || opt.recursive ||
opt.timestamping)
 +1700  {
 +1701/* ftp_retrieve_glob is a catch-all function that gets
called
 +1702   if we need globbing, time-stamping or recursion.  Its
 +1703   third argument is just what we really need.  */
 +1704ftp_retrieve_glob (u, con,
 +1705   (opt.ftp_glob  wild) ? GLOBALL :
GETONE);
 +1706  }
 +1707else
 +1708  res = ftp_loop_internal (u, NULL, con);

We guess the line 1704 should be a following line in order to return the
error code back to the main function.

 +1704res = ftp_retrieve_glob (u, con,
 +1705   (opt.ftp_glob  wild) ? GLOBALL :
GETONE);

Is this right?  If we change ftp.c in this way, does any other problems not
occured?

Best Regards,
   Norihisa Fujikawa,
   Programming Section in Numerical Prediction
Division,
   Japan Meteorological Agency