mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/net/http.rb: support TRACE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b3e53ed154
commit
36d86893c4
2 changed files with 16 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Wed May 19 02:29:36 2004 Minero Aoki <aamine@loveruby.net>
|
||||||
|
|
||||||
|
* lib/net/http.rb: support TRACE.
|
||||||
|
|
||||||
Wed May 19 02:21:53 2004 Minero Aoki <aamine@loveruby.net>
|
Wed May 19 02:21:53 2004 Minero Aoki <aamine@loveruby.net>
|
||||||
|
|
||||||
* lib/net/http.rb: do not use class variables.
|
* lib/net/http.rb: do not use class variables.
|
||||||
|
|
|
@ -799,6 +799,12 @@ module Net # :nodoc:
|
||||||
request(Mkcol.new(path, initheader), body)
|
request(Mkcol.new(path, initheader), body)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Sends a TRACE request to the +path+ and gets a response,
|
||||||
|
# as an HTTPResponse object.
|
||||||
|
def trace(path, initheader = nil)
|
||||||
|
request(Trace.new(path, initheader))
|
||||||
|
end
|
||||||
|
|
||||||
# Sends a GET request to the +path+ and gets a response,
|
# Sends a GET request to the +path+ and gets a response,
|
||||||
# as an HTTPResponse object.
|
# as an HTTPResponse object.
|
||||||
#
|
#
|
||||||
|
@ -1503,6 +1509,12 @@ e @header.each_key(&block)
|
||||||
REQUEST_HAS_BODY = true
|
REQUEST_HAS_BODY = true
|
||||||
RESPONSE_HAS_BODY = true
|
RESPONSE_HAS_BODY = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class Trace < HTTPRequest
|
||||||
|
METHOD = 'TRACE'
|
||||||
|
REQUEST_HAS_BODY = false
|
||||||
|
RESPONSE_HAS_BODY = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue