Closed Bug 129646 Opened 22 years ago Closed 22 years ago

print "Content-type:..." & ProcessTemplate cleanup patch

Categories

(Bugzilla :: Bugzilla-General, defect)

2.15
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 126266

People

(Reporter: chema, Assigned: justdave)

Details

Attachments

(1 file)

Remove most of the :
print "Content-type foo";

Replace the :

-    print "Content-type: application/vnd.mozilla.xul+xml\n\n";
-    # Generate and return the XUL from the appropriate template.
-    $template->process("sidebar/xul.tmpl", $vars)
-      || DisplayError("Template process failed: " . $template->error())
-      && exit;

Instances with :

+    ProcessTemplate ("sidebar/xul.tmpl", $vars, "application/vnd.mozilla.xul+xml");

Other tiny cleanups. 

This is a good first step towards making mozilla translatable and also will aid
in HTML compliance. And will not drive me crazy with "content-type: text/html"
all over the code ;-)
Attached patch PATCHSplinter Review
Is kinda large and will roten quickly, hope it can be reviewed soon. Made
against  March 8th CVS code.
Chema, you _really_ need to check with us or search Bugzilla before going off
and doing all this work! We really appreciate help, but duplicated effort helps
no-one.

You've duplicated what's going on in bug 126266, which has a well-architected
patch attached that's already had first review.

Gerv

*** This bug has been marked as a duplicate of 126266 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Yeah you are right, I tried looking arround for anything like what i was going
to do but could not find it.

However, I believe that the fix for <A
href="http://bugzilla.mozilla.org/show_bug.cgi?id=126266">126266</a> isn't the
best aproach, the right fix is not to replace :
print "Content-type:text/html\n\n"
with :
SendHTTPHeader()

but rather remove : 
print "Content-type:text/html\n\n" entirely and put it inside PutHeader(). 

I also added a way to replace the way Templates are called, because i needed it
to fix the content type thing, since the content type was also beeing printed
before the Templates where called.

I'm sorry for duplicating someone else's work, but i did try looking for this
before i did it.
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

Creator:
Created:
Updated:
Size: