Closed Bug 236926 Opened 21 years ago Closed 21 years ago

buglist.cgi isn't using $cgi->header

Categories

(Bugzilla :: Query/Bug List, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: Maniac, Assigned: justdave)

References

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040302 Firefox/0.8.0+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040302 Firefox/0.8.0+ I use bugzilla-2.17.7. Every script except buglist.cgi somehow automagically knows that I configured my Apache to send charset=utf-8. Buglist.cgi sends ISO-8859-5 instead. I've found and fixed the problem on my installation: showbug.cgi, line 363 --------------------- was: print "Content-Type: text/html\n\n"; replaced with: print Bugzilla->cgi->header(); showbug.cgi, line 860 --------------------- was: $contenttype = "text/html"; replaced with: $contenttype = "text/html; charset=utf-8"; Sorry, I'm not so familiar with cvs to make a proper patch. And also I'm at all not good at Perl and do not know where to get just a server's charset (not entire header) to avoid hard-coding 'utf-8'. But I hope just finding places will help :-). Reproducible: Always Steps to Reproduce:
Doh, he's right. The file in question is not showbug.cgi but buglist.cgi (he probably typoed in the original description. His line numbers are pretty close though, and we are indeed still printing manual headers there instead of using $cgi->header :(
Assignee: myk → justdave
Blocks: mod_perl
Status: UNCONFIRMED → NEW
Component: User Interface → Query/Bug List
Ever confirmed: true
Flags: blocking2.18+
OS: Windows 2000 → All
Hardware: PC → All
Summary: buglist.cgi doesn't honor HTTP charset → buglist.cgi isn't using $cgi->header
Target Milestone: --- → Bugzilla 2.18
Attached patch Patch v1 (deleted) — Splinter Review
Actually, the second one (line 860 in the above description) is correct as-is. We're only overriding the content type there, not the charset. Perl's CGI module handles charset separately and builds the header when sending it. For your problem above, the correct place to fix that is the line where we do $cgi->charset(''); in Bugzilla/CGI.pm (put the charset you want inside those quotes).
Attachment #144717 - Flags: review?(myk)
Comment on attachment 144717 [details] [diff] [review] Patch v1 Note other files that still want ->header(): chart.cgi sanitycheck.cgi
Attachment #144717 - Flags: review?(myk) → review+
Status: NEW → ASSIGNED
Flags: approval?
Flags: approval? → approval+
Checking in buglist.cgi; /cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v <-- buglist.cgi new revision: 1.249; previous revision: 1.248 done
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: