Re: [Bug-wget] [PATCH] [wget-bug #32357], IPv6 addresses not formatted..

2012-01-08 Thread Sasikanth
I fixed the other message too.

Change log entry (The diff also have the change log entry)

2012-01-9   Sasikantha babu   sasikanth@gmail.com
* connect.c (connect_to_ip): properly formatted ipv6 address display
(socket_family): New function - returns socket family
type
* http.c (gethttp): properly formatted ipv6 address display


Thanks
Sasi

On Sat, Jan 7, 2012 at 6:35 PM, Giuseppe Scrivano gscriv...@gnu.org wrote:

 thanks.  The patch is not complete yet, it doesn't fix the other message
 I have reported before.  Can you please check it as well?  Can you
 provide a ChangeLog file entry?

 Cheers,
 Giuseppe



 Sasikanth sasikanth@gmail.com writes:

  I had modified the patch as you guys suggested.
  For ipv6 the display will be [ipv6address]:port
  for ipv4   ipv4address:port
 
  The test results
 
  IPv4
  ---
 
  [root@Shash wget-1.13.4]# ./src/wget http://10.0.0.1
  --2012-01-07 11:01:23--  http://10.0.0.1/
  Connecting to 10.0.0.1:80...
 
  IPv6
  ---
  [root@Shash wget-1.13.4]# ./src/wget http://[3ffe:b80:17e2::1]
  --2012-01-07 11:01:06--  http://[3ffe:b80:17e2::1]/
  Connecting to [3ffe:b80:17e2::1]:80
 
  Thanks
  Sasi
 
  On Sat, Jan 7, 2012 at 3:14 AM, Henrik Holst
  henrik.ho...@millistream.comwrote:
 
  Exactly! That is how atleast I have akways seen address and port
  combinations been presented (or entered).
 
  /hh
  Den 6 jan 2012 21:27 skrev Micah Cowan mi...@micah.cowan.name:
 
  I believe hh's suggestion is to have the format reflect the way it would
  look in a URL; so [ and ] around ipv6, and nothing around ipv4 (since
 ipv4
  format isn't ambiguous in the way ipv6 is).
 
  (Sent by my Kindle Fire)
  -mjc
  Sent from my Kindle Fire
 
  --
  *From:* Sasikanth sasikanth@gmail.com
  *Sent:* Fri Jan 06 01:56:34 PST 2012
  *To:* henrik.ho...@millistream.com
  *Cc:* bug-wget@gnu.org
  *Subject:* Re: [Bug-wget] [PATCH] [wget-bug #32357], IPv6 addresses not
  formatted..
 
  Currently we are not checking family type of the address before
 printing
  the message.
 
  Do we have to print the message as [3ffe:b80:17e2::1]:80 for ipv6 and
 
  |10.0.0.1|:80 for ipv4?
 
  Please confirm so I will resubmit patch.
 
  Thanks
  Sasi
 
 
  Note: I didn't get the reply to my mail, to keep track the discussion I
 
  had copied the mail content from the mailing list.
 
  Shouldn't IPv6 addresses be displayed like this instead:
  [3ffe:b80:17e2::1]:80
 
  /hh
  Den 5 jan 2012 14:15 skrev Sasikanth address@hidden:
 
Hi,
  
This very small change related to display issue.
The  bug id is 32357
  https://savannah.gnu.org/bugs/index.php?32357;;
 
  
When we run wget
with
  an ip address alone  (wget 10.0.0.1 or wget
   http://10.0.0.1/ or wget http://[3ffe:b80:17e2::1])
the display shows as
 
  
IPV4
Connecting to 10.0.0.1:80...
IPV6
Connecting to 3ffe:b80:17e2::1:80   (Because of IPV6 format (ff::01)
  it is
   little hard differentiate the ipv6 address and port number)
 
  
This patch will show the display
  
IPV4
Connecting to |10.0.0.1|:80...
IPV6
Connecting to |3ffe:b80:17e2::1|:80
  
 
  
   Thanks
   Sasi
 
 
 
  --- src/connect.c.orig2012-01-07 09:39:55.965324001 +0530
  +++ src/connect.c 2012-01-07 10:54:08.295324000 +0530
  @@ -293,7 +293,12 @@
  xfree (str);
   }
 else
  -logprintf (LOG_VERBOSE, _(Connecting to %s:%d... ), txt_addr,
 port);
  +   {
  +   if (ip-family == AF_INET)
  +   logprintf (LOG_VERBOSE, _(Connecting to %s:%d... ),
 txt_addr, port);
  +   else if (ip-family == AF_INET6)
  +   logprintf (LOG_VERBOSE, _(Connecting to [%s]:%d... ),
 txt_addr, port);
  +   }
   }
 
 /* Store the sockaddr info to SA.  */

--- src/connect.c.orig  2012-01-07 09:39:55.965324001 +0530
+++ src/connect.c   2012-01-07 10:54:08.295324000 +0530
@@ -293,7 +293,12 @@
  xfree (str);
 }
   else
-logprintf (LOG_VERBOSE, _(Connecting to %s:%d... ), txt_addr, port);
+   {
+   if (ip-family == AF_INET)
+   logprintf (LOG_VERBOSE, _(Connecting to %s:%d... ), txt_addr, 
port);
+   else if (ip-family == AF_INET6)
+   logprintf (LOG_VERBOSE, _(Connecting to [%s]:%d... ), 
txt_addr, port);
+   }
 }
 
   /* Store the sockaddr info to SA.  */


Re: [Bug-wget] [PATCH] [wget-bug #32357], IPv6 addresses not formatted..

2012-01-08 Thread Sasikanth
sorry , i wrongly attached the file. Please find the correct one attached

Thanks
Sasi

On Mon, Jan 9, 2012 at 3:50 AM, Giuseppe Scrivano gscriv...@gnu.org wrote:

 thanks!  But I think something went wrong when you have generated the
 patch, you forgot to include changes to the http.c file.  Can you send
 the corrected version?

 Cheers,
 Giuseppe



 Sasikanth sasikanth@gmail.com writes:

  I fixed the other message too.
 
  Change log entry (The diff also have the change log entry)
 
  2012-01-9   Sasikantha babu   sasikanth@gmail.com
  * connect.c (connect_to_ip): properly formatted ipv6 address
 display
  (socket_family): New function - returns socket
 family type
  * http.c (gethttp): properly formatted ipv6 address display
 
  Thanks
  Sasi
 
  On Sat, Jan 7, 2012 at 6:35 PM, Giuseppe Scrivano gscriv...@gnu.org
 wrote:
 
  thanks.  The patch is not complete yet, it doesn't fix the other
 message
  I have reported before.  Can you please check it as well?  Can you
  provide a ChangeLog file entry?
 
  Cheers,
  Giuseppe
 
  Sasikanth sasikanth@gmail.com writes:
 
   I had modified the patch as you guys suggested.
   For ipv6 the display will be [ipv6address]:port
   for ipv4   ipv4address:port
  
   The test results
  
   IPv4
   ---
  
   [root@Shash wget-1.13.4]# ./src/wget http://10.0.0.1
   --2012-01-07 11:01:23--  http://10.0.0.1/
   Connecting to 10.0.0.1:80...
  
   IPv6
   ---
   [root@Shash wget-1.13.4]# ./src/wget http://[3ffe:b80:17e2::1]
   --2012-01-07 11:01:06--  http://[3ffe:b80:17e2::1]/
   Connecting to [3ffe:b80:17e2::1]:80
  
   Thanks
   Sasi
  
   On Sat, Jan 7, 2012 at 3:14 AM, Henrik Holst
   henrik.ho...@millistream.comwrote:
  
   Exactly! That is how atleast I have akways seen address and port
   combinations been presented (or entered).
  
   /hh
   Den 6 jan 2012 21:27 skrev Micah Cowan mi...@micah.cowan.name
 :
  
   I believe hh's suggestion is to have the format reflect the way
 it would
   look in a URL; so [ and ] around ipv6, and nothing around ipv4
 (since ipv4
   format isn't ambiguous in the way ipv6 is).
  
   (Sent by my Kindle Fire)
   -mjc
   Sent from my Kindle Fire
  
   --
   *From:* Sasikanth sasikanth@gmail.com
   *Sent:* Fri Jan 06 01:56:34 PST 2012
   *To:* henrik.ho...@millistream.com
   *Cc:* bug-wget@gnu.org
   *Subject:* Re: [Bug-wget] [PATCH] [wget-bug #32357], IPv6
 addresses not
   formatted..
  
   Currently we are not checking family type of the address before
 printing
   the message.
  
   Do we have to print the message as [3ffe:b80:17e2::1]:80 for
 ipv6 and
  
   |10.0.0.1|:80 for ipv4?
  
   Please confirm so I will resubmit patch.
  
   Thanks
   Sasi
  
  
   Note: I didn't get the reply to my mail, to keep track the
 discussion I
  
   had copied the mail content from the mailing list.
  
   Shouldn't IPv6 addresses be displayed like this instead:
   [3ffe:b80:17e2::1]:80
  
   /hh
   Den 5 jan 2012 14:15 skrev Sasikanth address@hidden:
  
 Hi,
   
 This very small change related to display issue.
 The  bug id is 32357
   https://savannah.gnu.org/bugs/index.php?32357;;
  
   
 When we run wget
 with
   an ip address alone  (wget 10.0.0.1 or wget
http://10.0.0.1/ or wget http://[3ffe:b80:17e2::1])
 the display shows as
  
   
 IPV4
 Connecting to 10.0.0.1:80...
 IPV6
 Connecting to 3ffe:b80:17e2::1:80   (Because of IPV6 format
 (ff::01)
   it is
little hard differentiate the ipv6 address and port number)
  
   
 This patch will show the display
   
 IPV4
 Connecting to |10.0.0.1|:80...
 IPV6
 Connecting to |3ffe:b80:17e2::1|:80
   
  
   
Thanks
Sasi
  
  
  
   --- src/connect.c.orig2012-01-07 09:39:55.965324001 +0530
   +++ src/connect.c 2012-01-07 10:54:08.295324000 +0530
   @@ -293,7 +293,12 @@
   xfree (str);
}
  else
   -logprintf (LOG_VERBOSE, _(Connecting to %s:%d... ),
 txt_addr, port);
   +   {
   +   if (ip-family == AF_INET)
   +   logprintf (LOG_VERBOSE, _(Connecting to %s:%d...
 ), txt_addr, port);
   +   else if (ip-family == AF_INET6)
   +   logprintf (LOG_VERBOSE, _(Connecting to
 [%s]:%d... ), txt_addr, port);
   +   }
}
  
  /* Store the sockaddr info to SA.  */
 
 
  --- src/connect.c.orig2012-01-07 09:39

Re: [Bug-wget] [PATCH] [wget-bug #32357], IPv6 addresses not formatted..

2012-01-07 Thread Giuseppe Scrivano

Micah Cowan mi...@micah.cowan.name writes:

 I believe hh's suggestion is to have the format reflect the way it would look 
 in a URL; so [ and ] around ipv6, and nothing around ipv4 (since ipv4 format 
 isn't ambiguous in the way ipv6 is).

I agree.  Please rework your patch to use [address]:port just for IPv6.

This message should be fixed as well Reusing existing connection to
ADDRESS:IP..

Please also provide a ChangeLog file entry.

Thanks for your contribution!
Giuseppe



Re: [Bug-wget] [PATCH] [wget-bug #32357], IPv6 addresses not formatted..

2012-01-07 Thread Sasikanth
I had modified the patch as you guys suggested.
For ipv6 the display will be [ipv6address]:port
for ipv4   ipv4address:port

The test results

IPv4
---

[root@Shash wget-1.13.4]# ./src/wget http://10.0.0.1
--2012-01-07 11:01:23--  http://10.0.0.1/
Connecting to 10.0.0.1:80...

IPv6
---
[root@Shash wget-1.13.4]# ./src/wget http://[3ffe:b80:17e2::1]
--2012-01-07 11:01:06--  http://[3ffe:b80:17e2::1]/
Connecting to [3ffe:b80:17e2::1]:80

Thanks
Sasi

On Sat, Jan 7, 2012 at 3:14 AM, Henrik Holst
henrik.ho...@millistream.comwrote:

 Exactly! That is how atleast I have akways seen address and port
 combinations been presented (or entered).

 /hh
 Den 6 jan 2012 21:27 skrev Micah Cowan mi...@micah.cowan.name:

 I believe hh's suggestion is to have the format reflect the way it would
 look in a URL; so [ and ] around ipv6, and nothing around ipv4 (since ipv4
 format isn't ambiguous in the way ipv6 is).

 (Sent by my Kindle Fire)
 -mjc
 Sent from my Kindle Fire

 --
 *From:* Sasikanth sasikanth@gmail.com
 *Sent:* Fri Jan 06 01:56:34 PST 2012
 *To:* henrik.ho...@millistream.com
 *Cc:* bug-wget@gnu.org
 *Subject:* Re: [Bug-wget] [PATCH] [wget-bug #32357], IPv6 addresses not
 formatted..

 Currently we are not checking family type of the address before printing
 the message.

 Do we have to print the message as [3ffe:b80:17e2::1]:80 for ipv6 and

 |10.0.0.1|:80 for ipv4?

 Please confirm so I will resubmit patch.

 Thanks
 Sasi


 Note: I didn't get the reply to my mail, to keep track the discussion I

 had copied the mail content from the mailing list.

 Shouldn't IPv6 addresses be displayed like this instead:
 [3ffe:b80:17e2::1]:80

 /hh
 Den 5 jan 2012 14:15 skrev Sasikanth address@hidden:

   Hi,
 
   This very small change related to display issue.
   The  bug id is 32357
 https://savannah.gnu.org/bugs/index.php?32357;;

 
   When we run wget
   with
 an ip address alone  (wget 10.0.0.1 or wget
  http://10.0.0.1/ or wget http://[3ffe:b80:17e2::1])
   the display shows as

 
   IPV4
   Connecting to 10.0.0.1:80...
   IPV6
   Connecting to 3ffe:b80:17e2::1:80   (Because of IPV6 format (ff::01)
 it is
  little hard differentiate the ipv6 address and port number)

 
   This patch will show the display
 
   IPV4
   Connecting to |10.0.0.1|:80...
   IPV6
   Connecting to |3ffe:b80:17e2::1|:80
 

 
  Thanks
  Sasi


--- src/connect.c.orig  2012-01-07 09:39:55.965324001 +0530
+++ src/connect.c   2012-01-07 10:54:08.295324000 +0530
@@ -293,7 +293,12 @@
  xfree (str);
 }
   else
-logprintf (LOG_VERBOSE, _(Connecting to %s:%d... ), txt_addr, port);
+   {
+   if (ip-family == AF_INET)
+   logprintf (LOG_VERBOSE, _(Connecting to %s:%d... ), txt_addr, 
port);
+   else if (ip-family == AF_INET6)
+   logprintf (LOG_VERBOSE, _(Connecting to [%s]:%d... ), 
txt_addr, port);
+   }
 }
 
   /* Store the sockaddr info to SA.  */


Re: [Bug-wget] [PATCH] [wget-bug #32357], IPv6 addresses not formatted..

2012-01-07 Thread Giuseppe Scrivano
thanks.  The patch is not complete yet, it doesn't fix the other message
I have reported before.  Can you please check it as well?  Can you
provide a ChangeLog file entry?

Cheers,
Giuseppe



Sasikanth sasikanth@gmail.com writes:

 I had modified the patch as you guys suggested.
 For ipv6 the display will be [ipv6address]:port
 for ipv4   ipv4address:port

 The test results

 IPv4
 ---

 [root@Shash wget-1.13.4]# ./src/wget http://10.0.0.1
 --2012-01-07 11:01:23--  http://10.0.0.1/
 Connecting to 10.0.0.1:80...

 IPv6
 ---
 [root@Shash wget-1.13.4]# ./src/wget http://[3ffe:b80:17e2::1]
 --2012-01-07 11:01:06--  http://[3ffe:b80:17e2::1]/
 Connecting to [3ffe:b80:17e2::1]:80

 Thanks
 Sasi

 On Sat, Jan 7, 2012 at 3:14 AM, Henrik Holst
 henrik.ho...@millistream.comwrote:

 Exactly! That is how atleast I have akways seen address and port
 combinations been presented (or entered).

 /hh
 Den 6 jan 2012 21:27 skrev Micah Cowan mi...@micah.cowan.name:

 I believe hh's suggestion is to have the format reflect the way it would
 look in a URL; so [ and ] around ipv6, and nothing around ipv4 (since ipv4
 format isn't ambiguous in the way ipv6 is).

 (Sent by my Kindle Fire)
 -mjc
 Sent from my Kindle Fire

 --
 *From:* Sasikanth sasikanth@gmail.com
 *Sent:* Fri Jan 06 01:56:34 PST 2012
 *To:* henrik.ho...@millistream.com
 *Cc:* bug-wget@gnu.org
 *Subject:* Re: [Bug-wget] [PATCH] [wget-bug #32357], IPv6 addresses not
 formatted..

 Currently we are not checking family type of the address before printing
 the message.

 Do we have to print the message as [3ffe:b80:17e2::1]:80 for ipv6 and

 |10.0.0.1|:80 for ipv4?

 Please confirm so I will resubmit patch.

 Thanks
 Sasi


 Note: I didn't get the reply to my mail, to keep track the discussion I

 had copied the mail content from the mailing list.

 Shouldn't IPv6 addresses be displayed like this instead:
 [3ffe:b80:17e2::1]:80

 /hh
 Den 5 jan 2012 14:15 skrev Sasikanth address@hidden:

   Hi,
 
   This very small change related to display issue.
   The  bug id is 32357
 https://savannah.gnu.org/bugs/index.php?32357;;

 
   When we run wget
   with
 an ip address alone  (wget 10.0.0.1 or wget
  http://10.0.0.1/ or wget http://[3ffe:b80:17e2::1])
   the display shows as

 
   IPV4
   Connecting to 10.0.0.1:80...
   IPV6
   Connecting to 3ffe:b80:17e2::1:80   (Because of IPV6 format (ff::01)
 it is
  little hard differentiate the ipv6 address and port number)

 
   This patch will show the display
 
   IPV4
   Connecting to |10.0.0.1|:80...
   IPV6
   Connecting to |3ffe:b80:17e2::1|:80
 

 
  Thanks
  Sasi



 --- src/connect.c.orig2012-01-07 09:39:55.965324001 +0530
 +++ src/connect.c 2012-01-07 10:54:08.295324000 +0530
 @@ -293,7 +293,12 @@
 xfree (str);
  }
else
 -logprintf (LOG_VERBOSE, _(Connecting to %s:%d... ), txt_addr, 
 port);
 +   {
 +   if (ip-family == AF_INET)
 +   logprintf (LOG_VERBOSE, _(Connecting to %s:%d... ), 
 txt_addr, port);
 +   else if (ip-family == AF_INET6)
 +   logprintf (LOG_VERBOSE, _(Connecting to [%s]:%d... ), 
 txt_addr, port);
 +   }
  }
  
/* Store the sockaddr info to SA.  */



Re: [Bug-wget] [PATCH] [wget-bug #32357], IPv6 addresses not formatted..

2012-01-06 Thread Sasikanth
Currently we are not checking family type of the address before printing
the message.

Do we have to print the message as [3ffe:b80:17e2::1]:80 for ipv6 and
|10.0.0.1|:80 for ipv4?

Please confirm so I will resubmit patch.

Thanks
Sasi


Note: I didn't get the reply to my mail, to keep track the discussion I
had copied the mail content from the mailing list.

Shouldn't IPv6 addresses be displayed like this instead:
[3ffe:b80:17e2::1]:80

/hh
Den 5 jan 2012 14:15 skrev Sasikanth address@hidden:

  Hi,

  This very small change related to display issue.
  The  bug id is 32357
https://savannah.gnu.org/bugs/index.php?32357;;

  When we run wget with an ip address alone  (wget 10.0.0.1 or wget
 http://10.0.0.1/ or wget http://[3ffe:b80:17e2::1])
  the display shows as

  IPV4
  Connecting to 10.0.0.1:80...
  IPV6
  Connecting to 3ffe:b80:17e2::1:80   (Because of IPV6 format (ff::01)
it is
 little hard differentiate the ipv6 address and port number)

  This patch will show the display

  IPV4
  Connecting to |10.0.0.1|:80...
  IPV6
  Connecting to |3ffe:b80:17e2::1|:80


 Thanks
 Sasi


Re: [Bug-wget] [PATCH] [wget-bug #32357], IPv6 addresses not formatted..

2012-01-06 Thread Micah Cowan
I believe hh's suggestion is to have the format reflect the way it would look 
in a URL; so [ and ] around ipv6, and nothing around ipv4 (since ipv4 format 
isn't ambiguous in the way ipv6 is).

(Sent by my Kindle Fire)
-mjc

Sent from my Kindle Fire

_
From: Sasikanth sasikanth@gmail.com
Sent: Fri Jan 06 01:56:34 PST 2012
To: henrik.ho...@millistream.com
Cc: bug-wget@gnu.org
Subject: Re: [Bug-wget] [PATCH] [wget-bug #32357],  IPv6 addresses not 
formatted..


Currently we are not checking family type of the address before printing
the message.

Do we have to print the message as [3ffe:b80:17e2::1]:80 for ipv6 and
|10.0.0.1|:80 for ipv4?

Please confirm so I will resubmit patch.

Thanks
Sasi


Note: I didn't get the reply to my mail, to keep track the discussion I
had copied the mail content from the mailing list.

Shouldn't IPv6 addresses be displayed like this instead:
[3ffe:b80:17e2::1]:80

/hh
Den 5 jan 2012 14:15 skrev Sasikanth address@hidden:

 Hi,

 This very small change related to display issue.
 The bug id is 32357
https://savannah.gnu.org/bugs/index.php?32357;;

 When we run wget with an ip address alone (wget 10.0.0.1 or wget
 http://10.0.0.1/ or wget http://[3ffe:b80:17e2::1])
 the display shows as

 IPV4
 Connecting to 10.0.0.1:80...
 IPV6
 Connecting to 3ffe:b80:17e2::1:80 (Because of IPV6 format (ff::01)
it is
 little hard differentiate the ipv6 address and port number)

 This patch will show the display

 IPV4
 Connecting to |10.0.0.1|:80...
 IPV6
 Connecting to |3ffe:b80:17e2::1|:80


 Thanks
 Sasi