accidentally applied wrong (old) patch, fixing up...
[oweals/busybox.git] / networking / wget.c
index cc768db8b6511089492b411f52e30bf1dfea19e1..5c3083c25d70791d239be525b4f2ddc58ca3108f 100644 (file)
@@ -235,9 +235,9 @@ int wget_main(int argc, char **argv)
         * and we want to connect to only one IP... */
        lsa = host2sockaddr(server.host, server.port);
        if (!(opt & WGET_OPT_QUIET)) {
-               fprintf(stderr, "Connecting to %s [%s]\n", server.host,
+               fprintf(stderr, "Connecting to %s (%s)\n", server.host,
                                xmalloc_sockaddr2dotted(&lsa->sa, lsa->len));
-               /* We leak xmalloc_sockaddr2dotted result */
+               /* We leak result of xmalloc_sockaddr2dotted */
        }
 
        if (use_proxy || !target.is_ftp) {
@@ -260,14 +260,6 @@ int wget_main(int argc, char **argv)
                         * Send HTTP request.
                         */
                        if (use_proxy) {
-//                             const char *format = "GET %stp://%s:%d/%s HTTP/1.1\r\n";
-//#if ENABLE_FEATURE_WGET_IP6_LITERAL
-//                             if (strchr(target.host, ':'))
-//                                     format = "GET %stp://[%s]:%d/%s HTTP/1.1\r\n";
-//#endif
-//                             fprintf(sfp, format,
-//                                     target.is_ftp ? "f" : "ht", target.host,
-//                                     ntohs(target.port), target.path);
                                fprintf(sfp, "GET %stp://%s/%s HTTP/1.1\r\n",
                                        target.is_ftp ? "f" : "ht", target.host,
                                        target.path);
@@ -566,28 +558,6 @@ static void parse_url(char *src_url, struct host_info *h)
        }
 
        sp = h->host;
-
-//host2sockaddr does this itself
-//#if ENABLE_FEATURE_WGET_IP6_LITERAL
-//     if (sp[0] == '[') {
-//             char *ep;
-//
-//             ep = sp + 1;
-//             while (*ep == ':' || isxdigit(*ep))
-//                     ep++;
-//             if (*ep == ']') {
-//                     h->host++;
-//                     *ep = '\0';
-//                     sp = ep + 1;
-//             }
-//     }
-//#endif
-//
-//     p = strchr(sp, ':');
-//     if (p != NULL) {
-//             *p = '\0';
-//             h->port = htons(xatou16(p + 1));
-//     }
 }
 
 
@@ -832,5 +802,4 @@ progressmeter(int flag)
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *     $Id: wget.c,v 1.75 2004/10/08 08:27:40 andersen Exp $
  */