こんにちは、酒井です。
先日たまたま気づいたのですが、例外が発生してしまって例外の情報を表示す
る時には、HTTP Status Code は 200 OK のままではなく、500 Internal
Server Error あたりに変更した方が良いのではないでしょうか。
でないと、検索エンジン等のロボットに例外の情報自体がコンテンツだと認識
されてしまいます。
--
酒井 政裕 / Masahiro Sakai
--- index.rb~ 2005-06-13 14:05:11.000000000 +0900
+++ index.rb 2006-05-25 00:38:56.000000000 +0900
@@ -102,8 +102,9 @@
end
rescue Exception
if @cgi then
- print @cgi.header( 'type' => 'text/plain' )
+ print @cgi.header( 'status' => '500 Internal Server Error', 'type' => 'text/plain' )
else
+ print "Status: 500 Internal Server Error\n"
print "Content-Type: text/plain\n\n"
end
puts "#$! (#{$!.class})"
|