class PassengerInfo::RequestInfo
Attributes
connected_at[RW]
host[RW]
method[RW]
number[RW]
path[RW]
pid[RW]
protocol[RW]
Public Class Methods
from_client_data(data)
click to toggle source
# File lib/passenger_info.rb, line 14 def self.from_client_data data req = data["current_request"] session = req["session"] || { } built = new number: data["number"], pid: session["pid"], method: req["method"], protocol: (req["flags"]["https"] ? "https" : "http" ), host: req["host"], path: req["path"], connected_at: ConnectionTime.new(data["connected_at"]) raise "wrong type: #{built.connected_at.class}" unless built.connected_at.is_a?(PassengerInfo::ConnectionTime) built end
Public Instance Methods
to_s()
click to toggle source
# File lib/passenger_info.rb, line 22 def to_s "PID #{pid.to_s.rjust(6)} #{method} #{protocol}://#{host}#{path} : connected at #{connected_at.local} (#{connected_at.relative})" end