Closed Bug 445104 Opened 16 years ago Closed 16 years ago

ssl redirects come with a 200 OK HTTP code on mod_perl

Categories

(Bugzilla :: Bugzilla-General, defect)

3.1.4
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Bugzilla 3.2

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file)

Today I logged into my "ssl: authenticated sessions" mod_perl tip installation, and I got a 200 OK with a redirect message, instead of a 302. This looks like a regression from the recent ssl-redirect fix.
Flags: blocking3.2+
I can only reproduce this under mod_perl--that might indicate a bug in CGI.pm.
Summary: ssl redirects come with a 200 OK HTTP code → ssl redirects come with a 200 OK HTTP code on mod_perl
Attached patch v1Splinter Review
Okay, this fixes it. The problem is under mod_perl, CGI.pm sends headers by calling a method on the mod_perl Request object. That *queues* headers to be sent. But then when we print a newline, that forces the *default* headers to be sent immediately, which are of course 200 OK headers (it was also pretty suspicious since they had an ISO-8859-1 charset instead of a UTF-8 one).
Assignee: general → mkanat
Status: NEW → ASSIGNED
Attachment #330128 - Flags: review?(dkl)
Attachment #330128 - Attachment is patch: true
Attachment #330128 - Attachment mime type: application/octet-stream → text/plain
Comment on attachment 330128 [details] [diff] [review]
v1

Tested on our devel system and works as expect. 
r=dkl
Attachment #330128 - Flags: review?(dkl) → review+
Flags: approval3.2+
Flags: approval+
Please check in this patch. :)
tip:

Checking in Bugzilla/CGI.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/CGI.pm,v  <--  CGI.pm
new revision: 1.38; previous revision: 1.37
done

3.2 branch:

Checking in Bugzilla/CGI.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/CGI.pm,v  <--  CGI.pm
new revision: 1.36.2.2; previous revision: 1.36.2.1
done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Had to back out this patch in addition to the main SSL redirect patch as was causing regression. For more details please see bug 428659.
Status: RESOLVED → REOPENED
Depends on: 428659
Resolution: FIXED → ---
Fixed for this was checked in with the patch in bug 428659. Closing.

Dave
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: