issue #111: non-default ports should always be included in the HTTP "Host" header, so should not be added again when building urls.
parent
1400d65202
commit
1fe4c9a293
|
@ -15,6 +15,7 @@ not yet released
|
|||
* #103: Added Russian translation.
|
||||
* #105: Fixing check for websites with unverified SSL certificates.
|
||||
* #107: Fixing update job for Synology DSM Task Scheduler.
|
||||
* #111: Generated urls for non-default ports included the port twice.
|
||||
* Support for Danish SMS provider Smsit <http://www.smsit.dk/>
|
||||
* Composer added for dependencies.
|
||||
|
||||
|
|
|
@ -463,11 +463,7 @@ function psm_build_sms() {
|
|||
* @return string
|
||||
*/
|
||||
function psm_build_url($params = array(), $urlencode = true, $htmlentities = true) {
|
||||
$defports = array(80, 443);
|
||||
$url = ($_SERVER['SERVER_PORT'] == 443 ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'];
|
||||
if(!in_array($_SERVER['SERVER_PORT'], $defports)) {
|
||||
$url .= ':' . $_SERVER['SERVER_PORT'];
|
||||
}
|
||||
$url .= dirname($_SERVER['SCRIPT_NAME']) . '/';
|
||||
|
||||
if($params != null) {
|
||||
|
|
Loading…
Reference in New Issue