Hey All,

Could someone explain why relative_url_root is hardcoded to only work
with apache:

request.rb (154:158):
   # Returns the path minus the web server relative installation directory.
   # This method returns nil unless the web server is apache.
   def relative_url_root
     @@relative_url_root ||= server_software == 'apache' ?
@env["SCRIPT_NAME"].to_s.sub(/\/dispatch\.(fcgi|rb|cgi)$/, '') : ''
   end

I'd like to use it with lighttpd as well.  I'll submit a patch but
just wanted to check the thinking on why it was restricted to apache
in the first place.

Also, how would you feel about a patch to let you specify the relative
url as an env variable (i.e. RAILS_RELATIVE_URL_ROOT)?  Seems like a
good candidate for something to be set by the server config file.

Thanks!

- Isaac
_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to