plugins/index_html/index_html.rb in rsence-2.0.0.5.pre vs plugins/index_html/index_html.rb in rsence-2.0.0.6.pre
- old
+ new
@@ -1,6 +1,6 @@
- ## Riassence Framework
+## RSence
# Copyright 2009 Riassence Inc.
# http://riassence.com/
#
# You should have received a copy of the GNU General Public License along
# with this software package. If not, contact licensing@riassence.com
@@ -9,11 +9,11 @@
=begin
IndexHtmlPlugin is the servlet plugin that is responsible for initializing the "boot-strap page".
It just loads, caches and sends the page for now.
=end
-class IndexHtmlPlugin < ServletPlugin
+class IndexHtmlPlugin < Servlet
def match( uri, method )
if uri == ::RSence.config[:index_html][:respond_address] and method == :get
return true
else
@@ -40,11 +40,11 @@
render_index_html
end
def close
# $TICKETSERVE.del_rsrc( @riassence_gif_id )
- @plugins[:ticketservices].del_rsrc( @loading_gif_id )
+ @plugins[:ticket].del_rsrc( @loading_gif_id )
end
def render_index_html
index_html = @index_html_src.clone
@@ -116,20 +116,21 @@
## Outputs a static web page.
def get( request, response, ses )
# puts "index_html"
# index_html = session_index_html( request, response )
index_html = render_index_html
+ # index_html = index_html.encode(Encoding::BINARY)
support_gzip = (request.header.has_key?('accept-encoding') and \
request.header['accept-encoding'].include?('gzip')) \
and not ::RSence.config[:no_gzip]
response.status = 200
response['Content-Type'] = 'text/html; charset=UTF-8'
response['Date'] = httime( Time.now )
- response['Server'] = 'Riassence Framework'
+ response['Server'] = 'RSence'
response['Cache-Control'] = 'no-cache'
if support_gzip
index_gzip = GZString.new('')
gzwriter = Zlib::GzipWriter.new( index_gzip, 9 )
@@ -143,8 +144,6 @@
response.body = index_html
end
end
end
-
-index_html = IndexHtmlPlugin.new