openx.inc includes the following part:
if (!empty($_SERVER['HTTPS'])) {
$protocol = 'https';
$server = variable_get('openx_delivery_url_https', 'd.openx.org');
}
else {
$protocol = 'http';
$server = variable_get('openx_delivery_url', 'd.openx.org');
}
I set HTTPS to either "on" or "off" when passing the request to PHP via FastCGI, and the above check treats both values as true and selects to use https.
To make it work, I substituted the condition with the one used in Drupal's includes/bootstrap.inc.
Please review the attached patch and consider it for inclusion.
Comments
Comment #1
wuinfo - bill wu commentedThanks for the patch.
Does this patch assume if $_SERVER['HTTPS'] is not set, it is http.
Is it behind reverse proxy?
I think we can remove the logic of checking https and http. just use generic one //sample.com/
Comment #2
wuinfo - bill wu commentedMoving this function to client side. like following code from Google
Comment #3
wuinfo - bill wu commentedHere is patch to move this function to client side. I think it is less code and more reliable. This patch base on 7.x-2.x dev.
Comment #4
wuinfo - bill wu commentedCode is committed