Will not 301 to unicode URI
kalabiyau opened this issue · comments
Artem Chernikov commented
r301 '/ashog.php', '/artists/гоша-ашог'
wil produce:
URI::InvalidURIError: bad URI
Only this will do
r301 '/ashog.php', (URI.parse(URI.encode '/artists/гоша-ашог')).to_s
Travis Jeffery commented
doubt this problem anymore since 1.9 added decent unicode support
require 'rack/rewrite/rule'
Rack::Rewrite::Rule.new(:r301,'/ashog.php', '/artists/гоша-ашог')
# => <Rack::Rewrite::Rule:0x007f9c39122938 @rule_type=:r301, @from="/ashog.php", @to="/artists/гоша-ашог", @options={}>