ssl redirects come with a 200 OK HTTP code on mod_perl

RESOLVED FIXED in Bugzilla 3.2

Status

()

--
critical
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: mkanat, Assigned: mkanat)

Tracking

3.1.4
Bugzilla 3.2
Bug Flags:
approval +
approval3.2 +
blocking3.2 +

Details

Attachments

(1 attachment)

(Assignee)

Description

11 years ago
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+
(Assignee)

Comment 1

11 years ago
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
(Assignee)

Comment 2

11 years ago
Created attachment 330128 [details] [diff] [review]
v1

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)
(Assignee)

Updated

11 years ago
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+
(Assignee)

Updated

11 years ago
Flags: approval3.2+
Flags: approval+

Comment 4

11 years ago
Please check in this patch. :)
(Assignee)

Comment 5

11 years ago
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
Last Resolved: 11 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
Last Resolved: 11 years ago11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.