I haven't exactly nailed this down yet, but it looks like -k isn't
doing the right thing under wget 1.7.  It might be only in combination
with one or more of -H or -p, but either way, the behavior below is
incorrect.  (I also haven't bothered trying 1.6.  I know that -k
worked fine under 1.5.3, but that release didn't have the -p option,
and this may be part of the problem.)

Try doing

    wget -p -nv -H -k -K http://www.cnn.com/SPECIALS/2001/trade.center/damage.map.html

and take a look at the URLs you get in damage.map.html itself.
(Having or not having -K doesn't change the incorrect nature
of -k's operation.)

URLs of the form

    
http://a388.g.akamai.net/f/388/21/1m/www.cnn.com/SPECIALS/2001/trade.center/interactive/damage.maps/sw.all.jpg

are instead transformed into

    
http://www.cnn.com/SPECIALS/2001/trade.center/../../../../a388.g.akamai.net/f/388/21/1m/www.cnn.com/SPECIALS/2001/trade.center/interactive/damage.maps/sw.all.jpg

which is no help at all!  The correct URL should have been

    
../../../../a388.g.akamai.net/f/388/21/1m/www.cnn.com/SPECIALS/2001/trade.center/interactive/damage.maps/sw.all.jpg

e.g., the URL copied from the invocation should not have
been prepended, since the whole point of -k is to localize
the URL by stripping the http:// and host information, hence
turning it into a local filesystem access.  This ain't that.

Thanks.

(If, for some reason, system information is required, see my
bug report of a few minuters ago about /usr/local/etc/wgetrc;
this is an HPUX 10.20 system and gcc.)

Reply via email to