Sha256: 094d8a655fc4b96a35fc3336ea4920abc79fa845b39df9129ccf374e5fde4f33

Contents?: true

Size: 746 Bytes

Versions: 27

Compression:

Stored size: 746 Bytes

Contents

# @private Inner workings of Ticket
module TicketService
# @private Inner workings of Ticket
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.bytesize.to_s
    @raw_uris['favicon.ico'][2] = ico_data
    
  end
  
end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
rsence-pre-3.0.0.16 plugins/ticket/lib/favicon.rb
rsence-pre-3.0.0.15 plugins/ticket/lib/favicon.rb
rsence-pre-3.0.0.14 plugins/ticket/lib/favicon.rb
rsence-pre-3.0.0.12 plugins/ticket/lib/favicon.rb
rsence-pre-3.0.0.11 plugins/ticket/lib/favicon.rb
rsence-pre-3.0.0.10 plugins/ticket/lib/favicon.rb
rsence-pre-3.0.0.9 plugins/ticket/lib/favicon.rb
rsence-pre-3.0.0.8 plugins/ticket/lib/favicon.rb
rsence-pre-3.0.0.7 plugins/ticket/lib/favicon.rb
rsence-pre-3.0.0.6 plugins/ticket/lib/favicon.rb
rsence-pre-3.0.0.5 plugins/ticket/lib/favicon.rb
rsence-pre-3.0.0.4 plugins/ticket/lib/favicon.rb
rsence-pre-3.0.0.3 plugins/ticket/lib/favicon.rb
rsence-pre-3.0.0.2 plugins/ticket/lib/favicon.rb
rsence-pre-3.0.0.1 plugins/ticket/lib/favicon.rb
rsence-pre-3.0.0.0 plugins/ticket/lib/favicon.rb
rsence-pre-2.3.0.26 plugins/ticket/lib/favicon.rb
rsence-pre-2.3.0.25 plugins/ticket/lib/favicon.rb
rsence-pre-2.3.0.24 plugins/ticket/lib/favicon.rb
rsence-pre-2.3.0.23 plugins/ticket/lib/favicon.rb