Closed
Bug 97234
Opened 25 years ago
Closed 23 years ago
HTTP POST vars should be optionally viewable in bugzilla cgi pages
Categories
(Bugzilla :: Administration, task, P3)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: kiko, Assigned: kiko)
Details
Attachments
(1 file, 1 obsolete file)
|
1.88 KB,
patch
|
gerv
:
review+
justdave
:
review-
|
Details | Diff | Splinter Review |
Today, there is no easy way to see the HTTP POST variables each page receives.
This makes bugfixing harder for a good number of bugs, since it's not very
simple to follow every code path in the files and the actual exchanged output
has to be sniffed through either a packet sniffer or a fake FORM ACTION string.
I propose adding a debug parameter to enable/disable debug output, and adding
the relevant output to each cgi header.
| Assignee | ||
Comment 1•25 years ago
|
||
justdave suggests adding this snippet to the end of CGI.pl's open-code section:
if ($::FORM{debug}) {
foreach my $k (keys %::MFORM) {
my $num = 0;
foreach my $m (@{$::MFORM{$k}}) {
print "$k[$num]: $::MFORM{$k}[$num] \n"; $num++;
}
}
}
and Jake suggests:
$::debug = 0; # Set this to 1 to enable debug options
| Assignee | ||
Comment 2•25 years ago
|
||
| Assignee | ||
Comment 3•25 years ago
|
||
Okay, the attached patch adds a parameter called "debug", which defaults to off
and for now triggers the output at the end of CGI.pl.
I can think of HTTP vars outputting, which I do, sorted, but perhaps somebody
would like something else put there to aid debugging?
Assignee: justdave → kiko
| Assignee | ||
Updated•25 years ago
|
Comment 4•25 years ago
|
||
Comment on attachment 47305 [details] [diff] [review]
Proposed fix v1
There is an extra } near the end of the first chunk that doesn't belong.
Attachment #47305 -
Flags: review-
Comment 5•25 years ago
|
||
My main issue with this is that it has to be done for the whole site. Why not
allow the user to have a userpref for debug info _or_ do what justdave
was talking about with ::FORM{debug}. This would make it much easier
| Assignee | ||
Comment 6•25 years ago
|
||
There is _NOT_ an extra "}" there.
| Assignee | ||
Comment 7•25 years ago
|
||
I've changed the patch to use a FORM parameter and to output the cookie vars as
well. This is the rather nice ouput of buglist.cgi?debug=1&... :
DEBUG INFORMATION
HTTP VARS:
bug_file_loc:
bug_file_loc_type: allwordssubstr
bug_id:
bug_status: NEW
bugidtype: include
changedin:
chfieldfrom:
chfieldto: Now
chfieldvalue:
cmdtype: doit
debug: 1
email1:
email2:
emailassigned_to1: 1
emailreporter2: 1
emailtype1: substring
emailtype2: substring
field0-0-0: noop
keywords:
keywords_type: anywords
long_desc:
long_desc_type: allwordssubstr
namedcmd: All my bugs
newqueryname:
order: 'Importance'
short_desc:
short_desc_type: allwordssubstr
status_whiteboard:
status_whiteboard_type: allwordssubstr
type0-0-0: noop
value0-0-0:
votes:
HTTP COOKIE:
LASTORDER=bugs.priority%2C%20bugs.bug_severity;
SITESERVER=ID=e58326c5509211ccd3008d3f52cc9967;
Bugzilla_login=kiko@async.com.br;
Bugzilla_logincookie=163;
PLATFORM=gal-python;
VERSION-gal-python=unspecified;
COLUMNLIST=severity priority platform owner status resolution qa_contact summary;
SPLITHEADER=0;
BUGLIST=114:143:137:91:109:110:131:144:147:148:149:150:152:154:155:157:158:159:161:172:173:174:176:130
Content-type: multipart/x-mixed-replace;boundary=thisrandomstring
--thisrandomstring Content-type: text/html
| Assignee | ||
Comment 8•25 years ago
|
||
Comment 9•25 years ago
|
||
Comment on attachment 52651 [details] [diff] [review]
kiko_v2: corrected as per zach's wish to use FORM variable
r=gerv.
Gerv
Attachment #52651 -
Flags: review+
Comment 10•25 years ago
|
||
Remotely related:
http://www.ags.uni-sb.de/~afranke/mozilla/quicksearchhack.html
There are these two buttons: "Preview Query URL: <<as alert>> <<as page>>"
It may give you some ideas how pretty-printing of the "field0-0-0", "type0-0-0"
and "value0-0-0" fields in this debug output could be further improved in the
future. :-)
Comment 11•25 years ago
|
||
Comment on attachment 52651 [details] [diff] [review]
kiko_v2: corrected as per zach's wish to use FORM variable
If you choose text/html, you should
escape the values before printing,
shouldn't you?
Also, what is the story about the "[0]"?
+ print "$k: @{$::MFORM{$k}}[0]<BR>\n";
Doesn't this print just the first of the values?
(e.g. for cclist values)?
Comment 12•25 years ago
|
||
Comment on attachment 52651 [details] [diff] [review]
kiko_v2: corrected as per zach's wish to use FORM variable
Please make a sub called form_output or some such.
I do this in my customised resolutions work in error situations where the parameters don't validate.
Attachment #52651 -
Attachment is obsolete: true
Updated•25 years ago
|
Attachment #47305 -
Attachment is obsolete: true
Updated•25 years ago
|
Priority: -- → P3
Target Milestone: --- → Bugzilla 2.16
Comment 13•25 years ago
|
||
Comment on attachment 52651 [details] [diff] [review]
kiko_v2: corrected as per zach's wish to use FORM variable
marking needs-work on behalf of Matty, I think he meant to do that instead of
obsolete (which it really shouldn't be, since there's nothing to replace it
yet).
Attachment #52651 -
Attachment is obsolete: false
Attachment #52651 -
Flags: review-
Comment 14•25 years ago
|
||
We are currently trying to wrap up Bugzilla 2.16. We are now close enough to
release time that anything that wasn't already ranked at P1 isn't going to make
the cut. Thus this is being retargetted at 2.18. If you strongly disagree with
this retargetting, please comment, however, be aware that we only have about 2
weeks left to review and test anything at this point, and we intend to devote
this time to the remaining bugs that were designated as release blockers.
Target Milestone: Bugzilla 2.16 → Bugzilla 2.18
Comment 15•24 years ago
|
||
Oh, this feature would rule so much. Kiko, any plans on this?
Comment 16•23 years ago
|
||
ping kiko
Comment 17•23 years ago
|
||
This won't work post-CGI.pm. Remind me why we want this, again? I've never had a
need, really (except when debugging the CGI.pm patch, but thats not a common case)
| Assignee | ||
Comment 18•23 years ago
|
||
It's very useful for finding out what variables are being sent to a certain
page, and seeing if what you *think* is being submitted actually is. It's a
basic debugging tool.
I guess I could work on this if it's still wanted, as a back-2-hack patch.
Comment 19•23 years ago
|
||
But all of our stuff are forms, so you cna just look at the html.
PageInfo->forms is also good.
| Assignee | ||
Comment 20•23 years ago
|
||
There's cookie information, which is not as easy to get to. There's also the
fact that Javascript can alter the form contents after submit (or any other
event) which means it's not as easy to see exactly what was sent.
As I said, it's something I've missed (coming from PHP where you had the very
nice phpinfo() which dumped everything for you). It could be overkill, so
INVALIDate it if you think so.
Finally, not every browser supports Page info :-)
Comment 21•23 years ago
|
||
Yeah, but this is for debugging, and all the bugzilla people use mozilla at
least partly. JS can change the fields, but it doesn't in bugzilla beacause we
don't require js.
Not to mention that you have to fins somewher to put this call to dump out all
the info.
Updated•23 years ago
|
OS: Linux → All
Hardware: PC → All
| Assignee | ||
Comment 22•23 years ago
|
||
I've decided to concede here. The form info dialog, and projects like
http://livehttpheaders.mozdev.org/ suggest to me that there is enough browser
support to warrant WONTFIXing this one. It wasn't so when I opened the bug,
though ;)
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → WONTFIX
Comment 23•23 years ago
|
||
clearing milestone on wontfix/duplicate/worksforme/invalid
Target Milestone: Bugzilla 2.18 → ---
Updated•13 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•