Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #46 (closed defect: fixed)

Opened 12 years ago

Last modified 10 years ago

Wrong mime-code on error page

Reported by: anonymous Owned by: anonymous
Priority: low Milestone:
Component: CherryPy Version:
Severity: minor Keywords:
Cc:

Description

Entering the URL  http://<hostname>:8080/static/images renders a page showing html code in the browser.

This is from the browsers main window, not the windows source code:


<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 StrictEN"

" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html> <head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>500 Internal error</title> <style type="text/css"> #poweredBy {

margin-top: 20px; border-top: 2px solid black; font-style: italic;

}

#traceback {

color: red;

} </style>

</head>

<body>

<h2>500 Internal error</h2> <p>Server got itself in trouble</p> <pre id="traceback">Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/CherryPy-2.1.0_rc2-py2.4.egg/cherrypy/_cphttptools.py", line 269, in run

applyFilters('beforeMain')

File "/usr/lib/python2.4/site-packages/CherryPy-2.1.0_rc2-py2.4.egg/cherrypy/_cphttptools.py", line 638, in applyFilters

method()

File "/usr/lib/python2.4/site-packages/CherryPy-2.1.0_rc2-py2.4.egg/cherrypy/lib/filter/staticfilter.py", line 68, in beforeMain

cptools.serveFile(filename)

File "/usr/lib/python2.4/site-packages/CherryPy-2.1.0_rc2-py2.4.egg/cherrypy/lib/cptools.py", line 280, in serveFile

bodyfile = open(path, 'rb')

IOError: [Errno 21] Is a directory </pre>

<div id="poweredBy"> <span>Powered by <a href=" http://www.cherrypy.org">Cherrypy 2.1.0-rc2</a></span> </div> </body>

</html>

Change History

comment:1 Changed 12 years ago by elvelind@…

see ticket 375 on cherrypys trac. It also contains a fix so hopefully cp will be updated.

comment:2 Changed 12 years ago by elvelind@…

  • Status changed from new to closed
  • Resolution set to fixed

fixed in cherrypy changeset [771].

Note: See TracTickets for help on using tickets.