Hi,
I recently start receiving server error emails. The error is thrown by
django/middleware/doc.py and as far as I can tell, a HEAD request
causing AttributeError: 'ModPythonRequest' object has no attribute
'user'.
The application is running on a linux box with a 3 months old svn
version of django, apache/mod-python and using pygments library for
syntax highlighting.
I don't see why someone / something is hitting with HEAD requests. Can
it be a security issue?
Here is the full traceback:
File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py",
line 77, in get_response
response = middleware_method(request, callback, callback_args,
callback_kwargs)
File "/usr/lib/python2.5/site-packages/django/middleware/doc.py",
line 15, in process_view
if request.method == 'HEAD' and (request.META.get('REMOTE_ADDR') in
settings.INTERNAL_IPS or (request.user.is_authenticated() and
request.user.is_staff)):
AttributeError: 'ModPythonRequest' object has no attribute 'user'
<ModPythonRequest
path:/,
GET:<QueryDict: {}>,
POST:<QueryDict: {}>,
COOKIES:{},
META:{'AUTH_TYPE': None,
'CONTENT_LENGTH': 0L,
'CONTENT_TYPE': 'httpd/unix-directory',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/
html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',
'HTTP_CACHE_CONTROL': 'max-age=0',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_HOST': 'viewhtml.com',
'HTTP_KEEP_ALIVE': '300',
'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:
1.8.1.11) Gecko/20071127 Firefox/2.0.0.11',
'PATH_INFO': '',
'PATH_TRANSLATED': None,
'QUERY_STRING': None,
'REMOTE_ADDR': '80.67.25.132',
'REMOTE_HOST': None,
'REMOTE_IDENT': None,
'REMOTE_USER': None,
'REQUEST_METHOD': 'HEAD',
'SCRIPT_NAME': None,
'SERVER_NAME': 'viewhtml.com',
'SERVER_PORT': 0,
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SOFTWARE': 'mod_python'}>
Thanks,
omat
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---