mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/net/http.rb: cosmetic improvements to documentation
* lib/net/imap.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
34e218f14d
commit
50ca9237b3
2 changed files with 318 additions and 316 deletions
|
@ -1,23 +1,39 @@
|
||||||
#
|
#
|
||||||
# = net/http.rb
|
# = net/http.rb
|
||||||
#
|
#
|
||||||
#--
|
|
||||||
# Copyright (c) 1999-2003 Yukihiro Matsumoto
|
# Copyright (c) 1999-2003 Yukihiro Matsumoto
|
||||||
# Copyright (c) 1999-2003 Minero Aoki
|
# Copyright (c) 1999-2003 Minero Aoki
|
||||||
#
|
#
|
||||||
# written & maintained by Minero Aoki <aamine@loveruby.net>.
|
# Written & maintained by Minero Aoki <aamine@loveruby.net>.
|
||||||
|
#
|
||||||
# This file is derived from "http-access.rb".
|
# This file is derived from "http-access.rb".
|
||||||
#
|
#
|
||||||
|
# Documented by Minero Aoki; converted to RDoc by William Webber.
|
||||||
|
#
|
||||||
# This program is free software. You can re-distribute and/or
|
# This program is free software. You can re-distribute and/or
|
||||||
# modify this program under the same terms of ruby itself ---
|
# modify this program under the same terms of ruby itself ---
|
||||||
# Ruby Distribute License or GNU General Public License.
|
# Ruby Distribution License or GNU General Public License.
|
||||||
|
#
|
||||||
|
# See Net:::HTTP for an overview and examples.
|
||||||
#
|
#
|
||||||
# NOTE: You can find Japanese version of this document here:
|
# NOTE: You can find Japanese version of this document here:
|
||||||
# ((<URL:http://www.ruby-lang.org/ja/man-1.6/?cmd=view;name=net%2Fhttp.rb>))
|
# http://www.ruby-lang.org/ja/man-1.6/?cmd=view;name=net%2Fhttp.rb
|
||||||
#
|
#
|
||||||
|
#--
|
||||||
# $Id$
|
# $Id$
|
||||||
#++
|
#++
|
||||||
#
|
|
||||||
|
require 'net/protocol'
|
||||||
|
require 'uri'
|
||||||
|
|
||||||
|
|
||||||
|
module Net # :nodoc:
|
||||||
|
|
||||||
|
# :stopdoc:
|
||||||
|
class HTTPBadResponse < StandardError; end
|
||||||
|
class HTTPHeaderSyntaxError < StandardError; end
|
||||||
|
# :startdoc:
|
||||||
|
|
||||||
# == What Is This Library?
|
# == What Is This Library?
|
||||||
#
|
#
|
||||||
# This library provides your program functions to access WWW
|
# This library provides your program functions to access WWW
|
||||||
|
@ -150,25 +166,7 @@
|
||||||
# Net::HTTP.version_1_2
|
# Net::HTTP.version_1_2
|
||||||
# Net::HTTP.start { |http3| ...(http3 has 1.2 features)... }
|
# Net::HTTP.start { |http3| ...(http3 has 1.2 features)... }
|
||||||
#
|
#
|
||||||
# This function is NOT multithread-safe.
|
# This function is NOT thread-safe.
|
||||||
#
|
|
||||||
|
|
||||||
require 'net/protocol'
|
|
||||||
require 'uri'
|
|
||||||
|
|
||||||
|
|
||||||
module Net # :nodoc:
|
|
||||||
|
|
||||||
# :stopdoc:
|
|
||||||
class HTTPBadResponse < StandardError; end
|
|
||||||
class HTTPHeaderSyntaxError < StandardError; end
|
|
||||||
# :startdoc:
|
|
||||||
|
|
||||||
#
|
|
||||||
# Class providing both short-cut class methods for retrieving entities,
|
|
||||||
# and instance methods for fuller HTTP functionality.
|
|
||||||
#
|
|
||||||
# See comment to the file http.rb for examples of usage.
|
|
||||||
#
|
#
|
||||||
class HTTP < Protocol
|
class HTTP < Protocol
|
||||||
|
|
||||||
|
@ -190,7 +188,7 @@ module Net # :nodoc:
|
||||||
@@newimpl = true
|
@@newimpl = true
|
||||||
end
|
end
|
||||||
|
|
||||||
# Turns on net/http 1.2 (ruby 1.8) features.
|
# Turns on net/http 1.1 (ruby 1.6) features.
|
||||||
# Defaults to OFF in ruby 1.8.
|
# Defaults to OFF in ruby 1.8.
|
||||||
def HTTP.version_1_1
|
def HTTP.version_1_1
|
||||||
@@newimpl = false
|
@@newimpl = false
|
||||||
|
@ -359,7 +357,7 @@ module Net # :nodoc:
|
||||||
end
|
end
|
||||||
|
|
||||||
# *WARNING* This method causes serious security hole.
|
# *WARNING* This method causes serious security hole.
|
||||||
# Never use this method in product code.
|
# Never use this method in production code.
|
||||||
#
|
#
|
||||||
# Set an output stream for debugging.
|
# Set an output stream for debugging.
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,11 +1,29 @@
|
||||||
|
#
|
||||||
# = net/imap.rb
|
# = net/imap.rb
|
||||||
#
|
#
|
||||||
#--
|
|
||||||
# Copyright (C) 2000 Shugo Maeda <shugo@ruby-lang.org>
|
# Copyright (C) 2000 Shugo Maeda <shugo@ruby-lang.org>
|
||||||
#
|
#
|
||||||
# This library is distributed under the terms of the Ruby license.
|
# This library is distributed under the terms of the Ruby license.
|
||||||
# You can freely distribute/modify this library.
|
# You can freely distribute/modify this library.
|
||||||
#++
|
#
|
||||||
|
# Documentation: Shugo Maeda, with RDoc conversion and overview by William
|
||||||
|
# Webber.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
require "socket"
|
||||||
|
require "monitor"
|
||||||
|
require "digest/md5"
|
||||||
|
begin
|
||||||
|
require "openssl"
|
||||||
|
rescue LoadError
|
||||||
|
end
|
||||||
|
|
||||||
|
module Net # :nodoc:
|
||||||
|
|
||||||
|
#
|
||||||
|
# Net::IMAP implements Internet Message Access Protocol (IMAP) client
|
||||||
|
# functionality. The protocol is described in [IMAP].
|
||||||
#
|
#
|
||||||
# == IMAP OVERVIEW
|
# == IMAP OVERVIEW
|
||||||
#
|
#
|
||||||
|
@ -176,21 +194,7 @@
|
||||||
# [[UTF7]]
|
# [[UTF7]]
|
||||||
# Goldsmith, D. and Davis, M., "UTF-7: A Mail-Safe Transformation Format of
|
# Goldsmith, D. and Davis, M., "UTF-7: A Mail-Safe Transformation Format of
|
||||||
# Unicode", RFC 2152, May 1997.
|
# Unicode", RFC 2152, May 1997.
|
||||||
|
|
||||||
require "socket"
|
|
||||||
require "monitor"
|
|
||||||
require "digest/md5"
|
|
||||||
begin
|
|
||||||
require "openssl"
|
|
||||||
rescue LoadError
|
|
||||||
end
|
|
||||||
|
|
||||||
module Net # :nodoc:
|
|
||||||
|
|
||||||
# Net::IMAP implements Internet Message Access Protocol (IMAP) client
|
|
||||||
# functionality. The protocol is described in [IMAP].
|
|
||||||
#
|
#
|
||||||
# See comment to the file imap.rb for examples of usage.
|
|
||||||
class IMAP
|
class IMAP
|
||||||
include MonitorMixin
|
include MonitorMixin
|
||||||
if defined?(OpenSSL)
|
if defined?(OpenSSL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue