Method: RequestRequest#initialize
- Defined in:
- lib/rwd/net.rb
#initialize(firstline) ⇒ RequestRequest
Returns a new instance of RequestRequest.
544 545 546 547 548 549 550 551 552 553 554 |
# File 'lib/rwd/net.rb', line 544 def initialize(firstline) @method, @uri, @protocol = firstline.split(/ /) @path, @data = @uri.split(/\?/) @data = "" if @data.nil? # TODO # i = @path.index(/%[[:digit:]]{2}/) # while not i.nil? # @path = @path[0..(i-1)] + @path[(i+1)..(i+2)].unpack('H2').shift.to_i.chr + @path[(i+3)..-1] # i = @path.index(/%[[:digit:]]{2}/) # end end |