#6647: WSGIRequestHandler dies on "OPTIONS *" request
-------------------------------+--------------------------------------------
Reporter:  nospampleasethanks  |       Owner:  nobody                
  Status:  new                 |   Component:  HTTP handling         
 Version:  SVN                 |    Keywords:  wsgi http server error
   Stage:  Unreviewed          |   Has_patch:  1                     
-------------------------------+--------------------------------------------
 An exception is raised by the '''WSGIRequestHandler''':

 {{{
 #!py
 Exception happened during processing of request from ('127.0.0.1', 60148)
 Traceback (most recent call last):
   File "SocketServer.py", line 222, in handle_request
     self.process_request(request, client_address)
   File "SocketServer.py", line 241, in process_request
     self.finish_request(request, client_address)
   File "SocketServer.py", line 254, in finish_request
     self.RequestHandlerClass(request, client_address, self)
   File "/usr/lib/python2.5/site-packages/django/core/servers/basehttp.py",
 line 554, in __init__
     BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
   File "SocketServer.py", line 522, in __init__
     self.handle()
   File "/usr/lib/python2.5/site-packages/django/core/servers/basehttp.py",
 line 595, in handle
     if not self.parse_request(): # An error code has been sent, just exit
   File "/usr/lib/python2.5/BaseHTTPServer.py", line 279, in parse_request
     self.send_error(400, "Bad request syntax (%r)" % requestline)
   File "/usr/lib/python2.5/BaseHTTPServer.py", line 343, in send_error
     self.log_error("code %d, message %s", code, message)
   File "/usr/lib/python2.5/BaseHTTPServer.py", line 414, in log_error
     self.log_message(*args)
   File "/usr/lib/python2.5/site-packages/django/core/servers/basehttp.py",
 line 603, in log_message
     if self.path.startswith(self.admin_media_prefix) or self.path ==
 '/favicon.ico':
 AttributeError: WSGIRequestHandler instance has no attribute 'path'
 }}}

 when an HTTP client makes the following request:

 {{{
 OPTIONS * / HTTP/1.1
 }}}

 Django raises a '''500 Internal Server Error'''.  Should it return a
 '''400 Bad Request''' instead?

 A patch defining a dummy '''self.path''' is attached.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/6647>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to