#17277 closed New feature (fixed)
make IOError exceptions during POST data read() easy to identify
| Reported by: | J. David Lowe | Owned by: | nobody |
|---|---|---|---|
| Component: | HTTP handling | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Graham Dumpleton, Carl Meyer | Triage Stage: | Ready for checkin |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
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.
Attachments (2)
Change History (8)
by , 14 years ago
| Attachment: | django.unreadablepost.patch added |
|---|
comment:1 by , 14 years ago
| Triage Stage: | Unreviewed → Design decision needed |
|---|
comment:2 by , 14 years ago
| Easy pickings: | unset |
|---|
comment:3 by , 14 years ago
| Patch needs improvement: | set |
|---|---|
| Triage Stage: | Design decision needed → Accepted |
by , 14 years ago
| Attachment: | django.unreadablepost.patch.2 added |
|---|
comment:6 by , 14 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
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.