This project is archived and is in readonly mode.
UrlRewriter rewrite_url doubles ports
Reported by Paul | May 19th, 2009 @ 10:40 AM | in 2.x
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))
Comments and changes to this ticket
-
José Valim February 23rd, 2010 @ 09:35 PM
- State changed from new to duplicate
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>