Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e536546
)
fixed this_url() for https
author
Jason
<jason@parth.(none)>
Thu, 5 Jun 2008 20:04:53 +0000
(16:04 -0400)
committer
Jason
<jason@parth.(none)>
Thu, 5 Jun 2008 20:04:53 +0000
(16:04 -0400)
http.php
patch
|
blob
|
history
diff --git
a/http.php
b/http.php
index
042e1b9
..
1fad97b
100644
(file)
--- a/
http.php
+++ b/
http.php
@@
-21,15
+21,12
@@
# return our best guess at the url used to access this page, without the path or query string
function this_url_sans_path() {
# return our best guess at the url used to access this page, without the path or query string
function this_url_sans_path() {
- list($protocol, $version) = explode('/', $_SERVER['SERVER_PROTOCOL']);
- $url = strtolower($protocol);
-
- if($url == 'http') {
- $expected_port = 80;
- } elseif ($url == 'https') {
+ if(strtolower($_SERVER['HTTPS']) == 'on' || strtolower($_SERVER['HTTPS']) == 'yes') {
+ $url = 'https';
$expected_port = 443;
} else {
$expected_port = 443;
} else {
- $expected_port = -1;
+ $url = 'http';
+ $expected_port = 80;
}
$url .= '://';
}
$url .= '://';