1
0
Fork 0
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:
aamine 2004-05-18 17:29:55 +00:00
parent b3e53ed154
commit 36d86893c4
2 changed files with 16 additions and 0 deletions

View file

@ -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>
* lib/net/http.rb: do not use class variables.

View file

@ -799,6 +799,12 @@ module Net # :nodoc:
request(Mkcol.new(path, initheader), body)
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,
# as an HTTPResponse object.
#
@ -1503,6 +1509,12 @@ e @header.each_key(&block)
REQUEST_HAS_BODY = true
RESPONSE_HAS_BODY = true
end
class Trace < HTTPRequest
METHOD = 'TRACE'
REQUEST_HAS_BODY = false
RESPONSE_HAS_BODY = true
end
end