Opened 10 years ago

Closed 10 years ago

#2924 closed defect (fixed)

Development server spins on an empty form post.

Reported by: Chris Beaven Owned by: Adrian Holovaty
Component: runserver Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


The relevant section from my template:

<form action="" method="post">
{% for followup in supplier.followups %}
<input type="checkbox" name="followups" value="{{ }}" /> {{ followup }}
{% endfor %}
<p><input type="submit" value="Remove selected logs" /></p>

If no checkboxes are selected, the servers sits there spinning after the submit button is pressed (which, note, has no name so isn't a POST item)

If I add <input type="hidden" name="empty" value="" /> inside the form, it works. So my conclusion is that the development server is spitting the dummy on an empty post.

When the next request comes in to the server, the console shows a traceback:

Traceback (most recent call last):
  File "D:\Web\Python24\lib\site-packages\django\core\servers\", line 273, in run
  File "D:\Web\Python24\lib\site-packages\django\core\servers\", line 312, in finish_response
  File "D:\Web\Python24\lib\site-packages\django\core\servers\", line 391, in write
  File "D:\Web\Python24\lib\site-packages\django\core\servers\", line 443, in send_headers
  File "D:\Web\Python24\lib\site-packages\django\core\servers\", line 372, in send_preamble
  File "D:\Web\Python24\Lib\", line 256, in write
  File "D:\Web\Python24\Lib\", line 243, in flush
error: (10053, 'Software caused connection abort')

Change History (3)

comment:1 Changed 10 years ago by Adrian Holovaty

Component: Core runserver

comment:2 Changed 10 years ago by Adrian Holovaty

Just ran into this myself. The problem is in django.core.handlers.wsgi, in WSGIRequest._get_raw_post_data(), in the safe_copyfileobj() call.

comment:3 Changed 10 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [4144]) Fixed #2924 -- Development server no longer spins on an empty form post. Bug caused by [3805]

Note: See TracTickets for help on using tickets.
Back to Top