fix: fix problem with URL parsing
This commit is contained in:
parent
f4824f8ca8
commit
f00e97d294
1 changed files with 4 additions and 3 deletions
|
@ -202,7 +202,7 @@ function generate_website($SURI) {
|
||||||
header('Etag: W/"' . $SURI . '/' . strtotime($feed['feed_ts']) . '"');
|
header('Etag: W/"' . $SURI . '/' . strtotime($feed['feed_ts']) . '"');
|
||||||
|
|
||||||
echo $feed['feed'];
|
echo $feed['feed'];
|
||||||
} elseif(preg_match('/^\s*image/', $_SERVER['HTTP_ACCEPT'])) {
|
} elseif(!preg_match('/^\s*text\/html/', $_SERVER['HTTP_ACCEPT'])) {
|
||||||
header('Location: /raw' . $SURI);
|
header('Location: /raw' . $SURI);
|
||||||
exit(0);
|
exit(0);
|
||||||
} elseif(true) {
|
} elseif(true) {
|
||||||
|
@ -210,8 +210,9 @@ function generate_website($SURI) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_website($_SERVER['REQUEST_URI']);
|
$URL_PATH = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
||||||
|
generate_website($URL_PATH);
|
||||||
|
|
||||||
log_and_die($_SERVER['REQUEST_URI']);
|
log_and_die($URL_PATH);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue