aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v3/sysenv.rb16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb
index a35a9eef..944df010 100644
--- a/lib/sisu/v3/sysenv.rb
+++ b/lib/sisu/v3/sysenv.rb
@@ -2068,15 +2068,20 @@ WOK
else "#{http}localhost" end
end
def webserv #web url for local webserv (localhost, or hostname)
- if path.webserv_dir \
+ if defined? @rc['webserv']['url_root'] \
+ and @rc['webserv']['url_root'] =~/http/
+ # needed for alternative output dir structures, fixes manifest url links, check may cause problems elsewhere
+ @rc['webserv']['url_root']
+ elsif path.webserv_dir \
and path.webserv =~ /#{path.webserv_dir}/ #revisit
"#{path.webserv}/#{@stub_pwd}".gsub(/#{path.webserv_dir}/,"#{url.hostname}/#{@stub_pwd}")
elsif defined? @rc['webserv']['webrick_url'] \
and @rc['webserv']['webrick_url']==false
- "file://#{path.webserv}/#{@stub_pwd}"
+ "file://#{path.webserv}"
elsif webserv_port_cgi =~/\S+/
- "#{url.hostname}:#{webserv_port_cgi}/#{@stub_pwd}"
- else "#{url.hostname}/#{@stub_pwd}"
+ "#{url.hostname}:#{webserv_port_cgi}"
+ else
+ url.hostname
end
end
def webserv_base #web url for local webserv (localhost, or hostname)
@@ -3810,8 +3815,7 @@ WOK
"#{@env.path.webserv}/#{@md.opt.f_pth[:pth_stub]}"
end
def url
- "#{@env.url.root}"
- #url: "#{@env.url.root}/#{@md.opt.f_pth[:pth_stub]}"
+ "#{@env.url.webserv}/#{@md.opt.f_pth[:pth_stub]}"
end
def rel
"./#{@md.opt.f_pth[:pth_stub]}"