Piwigo Bugtracker

Viewing Issue Advanced Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000800 [Piwigo] other major always 2008.02.05 03:23 2008.05.14 14:46
Reporter tieum View Status public  
Assigned To Pat
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 1.7.2 Product Version
  Target Version Product Build
Summary 0000800: get_absolute_root_url does not work with https protocol
Description get_absolute_root_url forces protocol to be http which causes problems with servers using https protocol.

Steps To Reproduce
Additional Information New function proposal to correct this issue:

function get_absolute_root_url($with_scheme=true)
{
  // TODO - add HERE the possibility to call PWG functions from external scripts
  $url = '';
  if ($with_scheme)
  {
    if (empty($_SERVER['HTTPS']))
    {
      $url .= 'http://'; [^]
    }
    else
    {
      $url .= 'https://'; [^]
    }
      
    $url .= $_SERVER['HTTP_HOST'];
    if ($_SERVER['SERVER_PORT'] != 80)
    {
      $url_port = ':'.$_SERVER['SERVER_PORT'];
      if (strrchr($url, ':') != $url_port)
      {
        $url .= $url_port;
      }
    }
  }
  $url .= cookie_path();
  return $url;
}
Tags No tags attached.
browser any
Database engine and version
PHP version
Web server Apache 1.3.x
Attached Files

- Relationships

-  Notes
(0002120)
VDigital (reporter)
2008.02.05 08:44

Thanks to tieum...
(0002152)
Pat (developer)
2008.02.29 14:10

branch 1.7: [Subversion] r2228
trunk: [Subversion] r2229

- Issue History
Date Modified Username Field Change
2008.02.05 03:23 tieum New Issue
2008.02.05 03:23 tieum browser => any
2008.02.05 03:23 tieum Web server => Apache 1.3.x
2008.02.05 08:44 VDigital Note Added: 0002120
2008.02.05 08:44 VDigital Status new => acknowledged
2008.02.29 11:02 Pat Status acknowledged => assigned
2008.02.29 11:02 Pat Assigned To => Pat
2008.02.29 14:07 Pat Status assigned => resolved
2008.02.29 14:07 Pat Fixed in Version => 1.7.2
2008.02.29 14:07 Pat Resolution open => fixed
2008.02.29 14:10 Pat Status resolved => feedback
2008.02.29 14:10 Pat Resolution fixed => reopened
2008.02.29 14:10 Pat Note Added: 0002152
2008.02.29 14:10 Pat Status feedback => resolved
2008.02.29 14:10 Pat Resolution reopened => fixed
2008.05.14 14:46 VDigital Status resolved => closed


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Contact
Powered by Mantis Bugtracker