[Django] #17277: make IOError exceptions during POST data read() easy to identify

5 views
Skip to first unread message

Django

unread,
Nov 22, 2011, 2:14:08 AM11/22/11
to django-...@googlegroups.com
#17277: make IOError exceptions during POST data read() easy to identify
-------------------------------+--------------------
Reporter: dlowe | Owner: nobody
Type: New feature | Status: new
Component: HTTP handling | Version: SVN
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------
This is related to #10046 and #17069. I'm wading into contentious
territory, I know ;)

In short, I want to be able to suppress the IOError exceptions that are
raised under common, but completely uncontrollable, client conditions e.g.
connection abruptly closed. Like others, though, I find it unacceptable to
completely suppress IOError exceptions, though -- it's a very broad
exception class, and I don't want to hide real bugs.

The attached patch addresses this by catching IOErrors that occur while
read()ing POST data, and re-throwing them as a new subclass of IOError.

IMO this would simplify the filtering logic for #17069, and would also
enable a narrowly-targeted fix to #10046 (which was closed, essentially,
because globally handling IOError isn't appropriate.)

Cc: grahamd and carljm, who are associated with the other two tickets.

--
Ticket URL: <https://code.djangoproject.com/ticket/17277>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 26, 2011, 11:14:55 AM11/26/11
to django-...@googlegroups.com
#17277: make IOError exceptions during POST data read() easy to identify
-------------------------------------+-------------------------------------
Reporter: dlowe | Owner: nobody
Type: New feature | Status: new
Component: HTTP handling | Version: SVN
Severity: Normal | Resolution:
Keywords: | Triage Stage: Design
Has patch: 1 | decision needed
Needs tests: 0 | Needs documentation: 0
Easy pickings: 1 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* needs_better_patch: => 0
* stage: Unreviewed => Design decision needed
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/17277#comment:1>

Django

unread,
Nov 26, 2011, 11:15:00 AM11/26/11
to django-...@googlegroups.com
#17277: make IOError exceptions during POST data read() easy to identify
-------------------------------------+-------------------------------------
Reporter: dlowe | Owner: nobody
Type: New feature | Status: new
Component: HTTP handling | Version: SVN
Severity: Normal | Resolution:
Keywords: | Triage Stage: Design
Has patch: 1 | decision needed
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* easy: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/17277#comment:2>

Django

unread,
Feb 10, 2012, 4:44:56 PM2/10/12
to django-...@googlegroups.com
#17277: make IOError exceptions during POST data read() easy to identify
-------------------------------+------------------------------------
Reporter: dlowe | Owner: nobody
Type: New feature | Status: new
Component: HTTP handling | Version: SVN
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by carljm):

* needs_better_patch: 0 => 1
* stage: Design decision needed => Accepted


Comment:

Thanks for the contribution! Sorry for the delay in moving it out of DDN.
Approach and patch look reasonable to me. Patch no longer applies cleanly
to trunk, needs updating.

--
Ticket URL: <https://code.djangoproject.com/ticket/17277#comment:3>

Django

unread,
Feb 10, 2012, 5:07:08 PM2/10/12
to django-...@googlegroups.com
#17277: make IOError exceptions during POST data read() easy to identify
-------------------------------+------------------------------------
Reporter: dlowe | Owner: nobody
Type: New feature | Status: new
Component: HTTP handling | Version: SVN
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by dlowe):

* needs_better_patch: 1 => 0


Comment:

New patch (based on r17492) is attached.

--
Ticket URL: <https://code.djangoproject.com/ticket/17277#comment:4>

Django

unread,
Feb 10, 2012, 5:51:08 PM2/10/12
to django-...@googlegroups.com
#17277: make IOError exceptions during POST data read() easy to identify
-------------------------------+------------------------------------
Reporter: dlowe | Owner: nobody
Type: New feature | Status: closed
Component: HTTP handling | Version: SVN
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by carljm):

* status: new => closed
* resolution: => fixed


Comment:

In [17493]:
{{{
#!CommitTicketReference repository="" revision="17493"
Fixed #17277 - Wrap IOErrors raised due to client disconnect in a specific
IOError subclass so they can be distinguished from more serious errors.
Thanks David Lowe.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/17277#comment:5>

Django

unread,
Feb 10, 2012, 6:49:02 PM2/10/12
to django-...@googlegroups.com
#17277: make IOError exceptions during POST data read() easy to identify
-------------------------------------+-------------------------------------
Reporter: dlowe | Owner: nobody
Type: New feature | Status: closed
Component: HTTP handling | Version: SVN
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by viciu):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/17277#comment:6>

Django

unread,
Feb 22, 2014, 1:06:07 AM2/22/14
to django-...@googlegroups.com
#17277: make IOError exceptions during POST data read() easy to identify
-------------------------------------+-------------------------------------
Reporter: dlowe | Owner: nobody

Type: New feature | Status: closed
Component: HTTP handling | Version: 1.1-rc

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by yFWQDHkt):

* version: master => 1.1-rc


Comment:

<a href=http://www.andresramirezgaviria.com/file/#v5zl>here</a> modafinil
mylan price - provigil 200 mg vs adderall

--
Ticket URL: <https://code.djangoproject.com/ticket/17277#comment:7>

Django

unread,
Feb 23, 2014, 9:20:23 PM2/23/14
to django-...@googlegroups.com
#17277: make IOError exceptions during POST data read() easy to identify
-------------------------------------+-------------------------------------
Reporter: dlowe | Owner: nobody

Type: New feature | Status: closed
Component: HTTP handling | Version: 1.3-beta

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by uHgYNJPF):

* version: master => 1.3-beta


Comment:

<a href=http://www.andresramirezgaviria.com/file/#qcss7>buy modafinil</a>
buy provigil online 2013 - provigil vs caffeine

Reply all
Reply to author
Forward
0 new messages