Opened 14 years ago

Closed 14 years ago

#14239 closed (wontfix)

Form input button embedded in <a /> crashes Django server

Reported by: leeezly Owned by: nobody
Component: HTTP handling Version: 1.2
Severity: Keywords: input button firefox
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I am running Ubuntu Lucid and got the default Django project setup without any apps included, created from Eclipse/Pydev. This only happens with Firefox but I reckon the problem is on the Django side, managing the HTTP requests, even though Firefox seems to send a double GET with the following setup.

With the Pydev(1.6.2) debug server running in Eclipse, I constantly get this bug. With the server running from terminal, I get the bug only once at the beginning.

The bug happens after pushing the input button (<input type="button">) in the browser.

urls.py:
   def view(request):
      return HttpResponse('<html><body><a href="/"><input type="button"></a></body></html>')

   urlpatterns = patterns('',
      (r'^/?$', 'urls.view'),
   )

ERROR:

Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 281, in run
    self.finish_response()
  File "/usr/local/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 321, in finish_response
    self.write(data)
  File "/usr/local/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 400, in write
    self.send_headers()
  File "/usr/local/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 464, in send_headers
    self.send_preamble()
  File "/usr/local/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 382, in send_preamble
    'Date: %s\r\n' % http_date()
  File "/usr/lib/python2.6/socket.py", line 300, in write
    self.flush()
  File "/usr/lib/python2.6/socket.py", line 286, in flush
    self._sock.sendall(buffer)
error: [Errno 32] Broken pipe

Change History (1)

comment:1 by Chris Beaven, 14 years ago

Resolution: wontfix
Status: newclosed
  1. Only that request is failing, the server is not "crashing". This issue is wontfixed already in #4444
  1. Don't do that.
Note: See TracTickets for help on using tickets.
Back to Top