Hi Tony, Thanks for your advice. I have tried the --user-agent option also. It works now.
: ) Albert Friday, November 28, 2003, 2:58:53 AM, you wrote: TL> [EMAIL PROTECTED] wrote: >> I am not sure if this is a bug, but it's really out of my expectation. >> >> Here is the way to reproduce the problem. >> >> 1. Put the URL http://ichart.yahoo.com/b?s=CSCO into the browser and >> then drag out the image. It should be a file with .png extension. So I >> believe this is PNG. (is it?!?) >> >> 2. wget -O csco.img "http://ichart.yahoo.com/b?s=CSCO" >> >> Originally, I thought that the files obtained in either way should be >> the same. But the fact is that they are of different sizes. From the >> 2nd file's header, it's a gif instead. This is the bigger file. >> >> Does it mean that wget has transformed the original file? Or did I >> miss any step? TL> The server changes its behavior based on the user agent. The following will TL> get back an image/gif: TL> wget http://ichart.yahoo.com/b?s=CSCO TL> while the following will get back an image/png: TL> wget http://ichart.yahoo.com/b?s=CSCO -U "Mozilla/4.0 (compatible)" TL> Tony