﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
15120	django.contrib.staticfiles.views.serve fails in windows7	oyvind	nobody	"
Using python 2.6

Settings:

{{{
#!python
DEBUG=False
STATIC_URL = '/media/'
STATICFILES_DIRS = (
    (""tinymce"", ""C:\\fivethreeo_project\\tinymce""),
)
}}}

Using manage.py runserver --insecure in latest svn fails with this traceback:

{{{
#!pytb
[19/Jan/2011 17:24:16] ""GET /media/tinymce/jscripts/tiny_mce/tiny_mce.js HTTP/1.
1"" 500 1409
Traceback (most recent call last):
  File ""c:\fivethreeo_project\virtualenvs\fivethreeo\src\django\django\core\serv
ers\basehttp.py"", line 282, in run
    self.result = application(self.environ, self.start_response)
  File ""c:\fivethreeo_project\virtualenvs\fivethreeo\src\django\django\contrib\s
taticfiles\handlers.py"", line 75, in __call__
    return super(StaticFilesHandler, self).__call__(environ, start_response)
  File ""c:\fivethreeo_project\virtualenvs\fivethreeo\src\django\django\core\hand
lers\wsgi.py"", line 273, in __call__
    response = self.get_response(request)
  File ""c:\fivethreeo_project\virtualenvs\fivethreeo\src\django\django\contrib\s
taticfiles\handlers.py"", line 65, in get_response
    return self.serve(request)
  File ""c:\fivethreeo_project\virtualenvs\fivethreeo\src\django\django\contrib\s
taticfiles\handlers.py"", line 58, in serve
    return serve(request, self.file_path(request.path), insecure=True)
  File ""c:\fivethreeo_project\virtualenvs\fivethreeo\src\django\django\contrib\s
taticfiles\views.py"", line 87, in serve
    response[""Last-Modified""] = http_date(statobj[stat.ST_MTIME])
  File ""c:\fivethreeo_project\virtualenvs\fivethreeo\src\django\django\utils\htt
p.py"", line 69, in http_date
    rfcdate = formatdate(epoch_seconds)
  File ""C:\Python26\Lib\email\utils.py"", line 160, in formatdate
    now = time.gmtime(timeval)
ValueError: (22, 'Invalid argument')
}}}

Removing line 87 makes the problem go away
"		closed	Contrib apps	dev		invalid	staticfiles		Unreviewed	0	0	0	0	0	0
