Roxen.git/
server/
etc/
modules/
Roxen.pmod
Branch:
Tag:
Non-build tags
All tags
No tags
2001-09-06
2001-09-06 11:41:31 by Per Hedbor <ph@opera.com>
c1f6f114f23f15b34dc26cfc16d9b7cc49ae32ab (
9
lines) (+
5
/-
4
)
[
Show
|
Annotate
]
Branch:
5.2
Handle the case when fix_relative returns "" (no id?)
Rev: server/etc/modules/Roxen.pmod:1.121
1:
// This is a roxen pike module. Copyright © 1999 - 2000, Roxen IS. //
-
// $Id: Roxen.pmod,v 1.
120
2001/
08
/
29
17
:
05
:
56
nilsson
Exp $
+
// $Id: Roxen.pmod,v 1.
121
2001/
09
/
06
11
:
41
:
31
per
Exp $
#include <roxen.h> #include <config.h>
515:
url = ""; // If the URL is a local relative URL we make it absolute.
-
if(!has_value(url, "://") && (!strlen(url)||url[0]!='/'))
+
if(!has_value(url, "://") && (!strlen(url)
||
url[0]
!=
'/')
)
url = fix_relative(url, id); // Add protocol and host to local absolute URLs.
-
if(url[0]=='/') {
+
if(
strlen(
url
) && url
[0]=='/') {
if(id) { url = id->url_base() + url[1..]; if (!prestates) prestates = id->prestate;