problem with CGIHTTPServer

7stud bbxx789_05ss at yahoo.com
Sat Mar 29 02:40:45 CET 2008


On Mar 28, 10:12 am, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
wrote:
> En Fri, 28 Mar 2008 12:38:45 -0300, 7stud <bbxx789_0... at yahoo.com>  
> escribió:
>
> > After I start the server script, load the html page in my browser, and
> > click on the link, I get the desired output in my browser, but the
> > server script outputs the following in my terminal:
>
> > localhost - - [28/Mar/2008 08:51:22] "GET /my_cgi_scripts/test.py HTTP/
> > 1.1" 200 -
> > localhost - - [28/Mar/2008 08:51:22] code 404, message File not found
> > localhost - - [28/Mar/2008 08:51:22] "GET /favicon.ico HTTP/1.1" 404 -
>
> > What are the error messages on lines two and three?
>
> Line 3 is your browser (IE, I presume?) asking for an icon for the site.
> Seehttp://en.wikipedia.org/wiki/Favicon
>

Safari.


> I don't know about line 2, maybe it's just a diagnostic message related to  
> line 3. Try refreshing the page, or using an inexistent url to see if it  
> still appears. Or put any icon as /favicon.ico to make your browser happy.
>

I searched for a .ico file on my computer, then copied it into the
same directory as the server program, and renamed the .ico file:

favcion.ico

Then I loaded my html file in Safari and clicked on the link, and this
was the output:

localhost - - [28/Mar/2008 19:30:31] "GET /my_cgi_scripts/test.py HTTP/
1.1" 200 -
localhost - - [28/Mar/2008 19:30:31] "GET /favicon.ico HTTP/1.1" 200 -

So, it looks like Safari automatically requests a .ico file from a
server.  Thanks.




More information about the Python-list mailing list