[Nitro] Render#redirect question

Jon A. Lambert jlsysinc at alltel.net
Thu Jun 8 02:01:21 EDT 2006


Just a question about nitro/render.rb

def redirect(url, status = 303)
  url = url.to_s
  unless url =~ /^http/
    url = "#@base/#{url}" unless url =~ /^\//
    url = "#{@context.host_url}/#{url.gsub(/^\//, '')}"
  end

  @context.status = status
  @context.out = "<html><a href=\"#{url}\">#{url}</a>.</html>\n"
  @context.response_headers['location'] = url

  raise RenderExit
end

Shouldn't that be status 302 assuming it's the same as the HTTP status 
codes?

Thanks
J. Lambert 




More information about the Nitro-general mailing list