Calls to show with unspecified page name cause HTTP 404, not HTTP 500

This commit is contained in:
Alexey Verkhovsky 2005-03-26 05:37:04 +00:00
parent 6cceead11c
commit c73db9ff5d
2 changed files with 13 additions and 1 deletions

View file

@ -207,7 +207,11 @@ class WikiController < ApplicationController
end
end
else
redirect_to :web => @web_name, :action => 'new', :id => CGI.escape(@page_name)
if not @page_name.nil? and not @page_name.empty?
redirect_to :web => @web_name, :action => 'new', :id => CGI.escape(@page_name)
else
render_text 'Page name is not specified', '404 Not Found'
end
end
end