Sha256: b0b20c5d18c553a0afd4b66afd8172c001dd9544479b9b2d6c30e81f484c57d5

Contents?: true

Size: 911 Bytes

Versions: 5

Compression:

Stored size: 911 Bytes

Contents

#--
##   RSence
 #   Copyright 2008 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
 ##
 #++


module TicketService
module Favicon
  
  def favicon( req, res ) # :nodoc:
    
    res.status = 200
    
    favicon_data = @raw_uris['favicon.ico']
    
    res['Content-Type'] = favicon_data[0]
    res['Content-Length'] = favicon_data[1]
    
    res['Date'] = httime( Time.now )
    res.body = favicon_data[2]
    
  end
  
  # Sets favicon. First parameter is favicon data and the second one is content type which defaults to false.
  def set_favicon( ico_data, content_type=false )
    @raw_uris['favicon.ico'][0] = content_type if content_type
    @raw_uris['favicon.ico'][1] = ico_data.size.to_s
    @raw_uris['favicon.ico'][2] = ico_data
    
  end
  
end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rsence-2.0.0.10.pre plugins/ticket/lib/favicon.rb
rsence-2.0.0.9.pre plugins/ticket/lib/favicon.rb
rsence-2.0.0.8.pre plugins/ticket/lib/favicon.rb
rsence-2.0.0.7.pre plugins/ticket/lib/favicon.rb
rsence-2.0.0.6.pre plugins/ticket/lib/favicon.rb