diff options
author | Ralph Amissah <ralph@amissah.com> | 2011-05-29 20:48:47 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2011-05-29 20:48:47 -0400 |
commit | 429f8e3dbd0596f2b84e3eef9ad58ffabe8a53df (patch) | |
tree | 4b1d04397000608cd5731c2ace236a95175c415f /lib/sisu/v3/sysenv.rb | |
parent | debian/changelog (3.0.10-1) (diff) | |
parent | v3: documentation, minor update, includes --find / --glob (diff) |
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v3/sysenv.rb')
-rw-r--r-- | lib/sisu/v3/sysenv.rb | 16 |
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]}" |