ssb Rev.17132 が ubuntu 8.04/Ruby 1.8.6 で動作しなくなってる問題に対処する
変更点は2点.
Index: libs/ssb.rb =================================================================== --- libs/ssb.rb (リビジョン 17132) +++ libs/ssb.rb (作業コピー) @@ -40,7 +40,7 @@ ['response is nil', 'N/A'] when ssb_response.instance_of?(String) string_response(cgi_response, ssb_response) - when ['301', '302'].include? ssb_response.code + when ['301', '302'].include?(ssb_response.code) redirect_response(cgi_response, ssb_response) else ok_response(cgi_response, ssb_response) @@ -159,7 +159,7 @@ when '/' %Q! #{attribute}="./?ssb_q=#{WEBrick::HTTPUtils.escape_form(('http://' + request_uri.host + ':' + request_uri.port.to_s + CGI.unescapeHTML(value)).to_s)}"#{$5} target="_top">! else - %Q! #{attribute}="./?ssb_q=#{WEBrick::HTTPUtils.escape_form((request_uri + CGI.escape(CGI.unescapeHTML(value))).to_s)}"#{$5} target="_top">! + %Q! #{attribute}="./?ssb_q=#{WEBrick::HTTPUtils.escape_form(((CGI.unescapeHTML(value))).to_s)}"#{$5} target="_top">! end when 'action' %Q! #{attribute}="./" #{$5}><input type="hidden" name="ssb_q" value="#{(request_uri + value).to_s}" />!
1つ目はパーサーの都合かな?2つ目はリダイレクトするときになぜか飛び先が変わってしまう問題.これは,本来ならリンクは
http://localhost:10080/?ssb_q=http://hostname:port/controller/action/....
とならなければならないのだが,
http://localhost:10080/?ssb_q=http://hostname:port/controller/http://hostname:port/controller/action...
と言う感じに余計なおまけが頭についてしまってました.同じような問題が起きている人がいればご参考にでも.