lib/rio/scheme/http.rb in rio-0.5.1 vs lib/rio/scheme/http.rb in rio-0.6.0
- old
+ new
@@ -1,8 +1,8 @@
#--
# ===========================================================================
-# Copyright (c) 2005-2012 Christopher Kleckner
+# Copyright (c) 2005-2017 Christopher Kleckner
# All rights reserved
#
# This file is part of the Rio library for ruby.
#
# Rio is free software; you can redistribute it and/or modify
@@ -27,14 +27,10 @@
module HTTP #:nodoc: all
RESET_STATE = 'HTTP::Stream::Open'
require 'rio/rrl/withpath'
class RRL < RIO::RRL::URIBase
- #def self.splitrl(s)
- # sub,opq,whole = split_riorl(s)
- # [whole]
- #end
require 'uri'
require 'open-uri'
def open(*args)
u = ::URI.parse(self.to_s)
IOH::Stream.new(u.open)
@@ -58,11 +54,18 @@
require 'rio/stream'
class Input < RIO::Stream::Input
include Ops::Path::Status
include Ops::Path::URI
include Ops::Path::Query
- extend Forwardable
- def_instance_delegators(:ioh,:meta,:status,:charset,:content_encoding,:content_type,:last_modified,:base_uri)
+ extend RIO::Fwd
+ fwd_readers :ioh,
+ :meta,
+ :status,
+ :charset,
+ :content_encoding,
+ :content_type,
+ :last_modified,
+ :base_uri
end
end
end
end # module RIO