[BusyBox] wget redirect to other server (patch)

Leif Lindholm leif at smurfnet.nu
Wed Jan 14 21:26:55 UTC 2004


Hi

This patch fixes a bug (at least I think it is :) in wget, when using a
http location header to redirect to a server other than the one the
request was sent to.

Please cc any replies since I'm not on the list.

/
	Leif

--- busybox-1.00-pre5/networking/wget.c     2003-12-20 02:47:18.000000000 +0100
+++ busybox-1.00-pre5-new/networking/wget.c 2004-01-14 22:20:10.000000000 +0100
@@ -405,6 +405,9 @@
                                                        server.port = target.port;
                                                }
                                        }
+                                       bb_lookup_host(&s_in, server.host);
+                                       s_in.sin_port = server.port;
+                                       break;
                                }
                        }
                } while(status >= 300);





More information about the busybox mailing list