[Nitro] Render#redirect question
Jonas Pfenniger
zimba.tm at gmail.com
Thu Jun 8 18:15:05 EDT 2006
On 08/06/06, Jon A. Lambert <jlsysinc at alltel.net> wrote:
> 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?
Yes it's the same as HTTP status codes but I don't know them by heart.
Can you provide a patch ?
--
Cheers,
zimbatm
http://zimbatm.oree.ch
More information about the Nitro-general
mailing list