Piwigo Bugtracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000800Piwigootherpublic2008.02.05 03:232008.05.14 14:46
Reportertieum 
Assigned ToPat 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version1.7.2 
Summary0000800: get_absolute_root_url does not work with https protocol
Descriptionget_absolute_root_url forces protocol to be http which causes problems with servers using https protocol.

Additional InformationNew 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;
}
TagsNo tags attached.
browserany
Database engine and version
PHP version
Web serverApache 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


Copyright © 2000 - 2015 MantisBT Team
Contact
Powered by Mantis Bugtracker