aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-05-24 21:39:00 -0400
committerRalph Amissah <ralph@amissah.com>2011-05-24 21:39:22 -0400
commit0df2126ee144e10cccaad32d550b7a741146aac2 (patch)
treec82f84eb16b59f281fe4a8804d59f26e0eac03eb /lib
parentv3: 3.0.11 version & changelog "opened" (diff)
v3: sysenv, url webserver link (manifest) fix
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]}"