Open Bug 645488 Opened 14 years ago Updated 8 years ago

Only call init_page() at startup for CGI requests.

Categories

(Bugzilla :: Bugzilla-General, enhancement)

enhancement
Not set
normal

Tracking

()

People

(Reporter: yavor.nikolov7+bugzilla, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:2.0) Gecko/20100101 Firefox/4.0 Build Identifier: 4.0 When using Bugzilla directly from a standalone Perl application (OS daemon, batch script, etc) - currently Bugzilla seems to do some console-specific initializations which are most likely not desired. Would be good to skip those (let the embedding application take control on its outputs encoding). Reproducible: Always Steps to Reproduce: 1.Run this on non utf8 environment (e.g. Windows usually results in weird encodings) 2.Run standalone perl app (USAGE_MODE_CMDLINE) - in which Bugzilla is loaded ("use Bugzilla;") 3.Check PerlIO layers Actual Results: Bugzilla is changing stdout/stderr encoding in Bugzilla::Install::Util->set_output_encodings(). (This is called by Bugzilla.pm init_page which is called on module initialization). Use case is also described here (alongside with another issue): http://groups.google.com/group/mozilla.support.bugzilla/browse_thread/thread/87e6b858e2594e46 Expected Results: Be able to somehow instruct Bugzilla so that it skips changing outputs encoding (and maybe other irrelevant initializations intended for foreground console usage).
Summary: Allow setting Bugzilla for embedded usage in Perl applications - skip console-specific initializations → Only call init_page() at startup for CGI requests.
Status: UNCONFIRMED → NEW
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.