Opened 17 years ago
Closed 16 years ago
#7529 closed (fixed)
Debug 500 Page Shows POST, GET, and COOKIES but not FILES
Reported by: | Alex Gaynor | Owned by: | Alex Gaynor |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
It would be nice if it showed them.
Attachments (3)
Change History (16)
by , 17 years ago
Attachment: | files.diff added |
---|
comment:1 by , 17 years ago
Has patch: | set |
---|
comment:2 by , 17 years ago
Component: | Uncategorized → Metasystem |
---|---|
Triage Stage: | Unreviewed → Design decision needed |
comment:3 by , 17 years ago
Patch needs improvement: | set |
---|
The patch prints out full file contents in the debug page. This will be unpleasant with big files.
I suggest limiting the amount of printed file data to the first 200 bytes or so, and to replace binary characters with hexadecimal values.
comment:4 by , 16 years ago
Triage Stage: | Design decision needed → Accepted |
---|
Files are huge amounts of data. A patch to show the number of uploaded files would be reasonable, but we shouldn't be showing their contents (even the first 200 bytes is really pretty useless most of the time). It's just too much opaque information. If somebody wants more information, they can do their own 500 handling without a lot of trouble (or put debugging prints into their code based on the exception traceback).
comment:5 by , 16 years ago
To my understanding the unicode method on the file objects should be printing out the filename, which is acceptable to print out.
comment:6 by , 16 years ago
Keywords: | 1.0-unsure added |
---|
comment:7 by , 16 years ago
Small note: I have tested this post-2070, so it does indeed print out the file names.
comment:8 by , 16 years ago
Here's what it prints: http://code.djangoproject.com/browser/django/trunk/django/core/files/uploadedfile.py#L57
comment:9 by , 16 years ago
milestone: | → 1.0 maybe |
---|
comment:10 by , 16 years ago
Component: | Metasystem → Core framework |
---|---|
Keywords: | 1.0-unsure removed |
milestone: | 1.0 maybe → post-1.0 |
comment:11 by , 16 years ago
Owner: | changed from | to
---|
by , 16 years ago
Attachment: | debug-files.diff added |
---|
by , 16 years ago
Attachment: | debug-files.2.diff added |
---|
Now it shows them just like POST, etc..