Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.1

Bug #3378 absoluteURI always applies https protocol under IIS6
Submitted: 2005-02-04 14:25 UTC
From: pjswaine at alphazero dot freeserve dot co dot uk Assigned: mike
Status: Closed Package: HTTP
PHP Version: 4.3.1 OS: Windows NT
Roadmaps: (Not assigned)    
Subscription  


 [2005-02-04 14:25 UTC] pjswaine at alphazero dot freeserve dot co dot uk
Description: ------------ On IIS6 absoluteURI() always returns a URI with the https protocol when a relative address is fed in. The problem stems from the environmental setting $_SERVER['HTTPS'] which behaves differently under IIS than under Apache. On Apache $_SERVER['HTTPS'] is not set when the protocol is http, but IIS does set it - to "off". Hence line 288 in version 1.3.3 only checks to see if $_SERVER['HTTPS'] is set, not whether it is set to "on". Reproduce code: --------------- Line 288 of HTTP.php v1.3.3 reads: $protocol = isset($_SERVER['HTTPS']) ? 'https' : 'http'; To fix the issue under IIS it could read: $protocol = (isset($_SERVER['HTTPS']) AND strtolower($_SERVER['HTTPS']) === "on") ? 'https' : 'http';

Comments

 [2005-02-07 08:37 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!