Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

UrlRewriter rewrite_url doubles ports

#2676

if i change the :port => new_port within an url_for( :only_path => false ...) an url like 'http://foo.bar.com:port_old:port_new will be created if the current request uses non std. ports.

The fix is simple though:

change Line 180:

      rewritten_url << (options[:host] || @request.host_with_port)

to:

      rewritten_url << (options[:host] || (options.key?(:port) ? @request.host : @request.host_with_port))

Reported by Paul · May 19th, 2009 @ 10:40 AM

State: duplicate
Milestone: 2.x
Assigned to: nobody
Importance: none