Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📚 Use standard www.rfc-editor.org links for RFCs #374

Merged
merged 1 commit into from
Jan 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Net::IMAP

Net::IMAP implements Internet Message Access Protocol (IMAP) client
functionality. The protocol is described in [IMAP](https://tools.ietf.org/html/rfc3501).
functionality. The protocol is described in [RFC3501](https://www.rfc-editor.org/rfc/rfc3501).

## Installation

Expand Down
144 changes: 72 additions & 72 deletions lib/net/imap.rb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/net/imap/fetch_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def flags; attr["FLAGS"] end
# :call-seq: internaldate -> Time or nil
#
# The internal date and time of the message on the server. This is not
# the date and time in the [RFC5322[https://tools.ietf.org/html/rfc5322]]
# the date and time in the [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]]
# header, but rather a date and time which reflects when the message was
# received.
#
Expand Down Expand Up @@ -341,7 +341,7 @@ def rfc822; attr["RFC822"] end

# :call-seq: rfc822_size -> Integer or nil
#
# A number expressing the [RFC5322[https://tools.ietf.org/html/rfc5322]]
# A number expressing the [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]]
# size of the message.
#
# This is the same as getting the value for <tt>"RFC822.SIZE"</tt> from
Expand Down
72 changes: 36 additions & 36 deletions lib/net/imap/response_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ class MailboxQuotaRoot < Struct.new(:mailbox, :quotaroots)
# Net::IMAP#getacl returns an array of MailboxACLItem objects.
#
# ==== Required capability
# +ACL+ - described in [ACL[https://tools.ietf.org/html/rfc4314]]
# +ACL+ - described in [ACL[https://www.rfc-editor.org/rfc/rfc4314]]
class MailboxACLItem < Struct.new(:user, :rights, :mailbox)
##
# method: mailbox
Expand Down Expand Up @@ -565,11 +565,11 @@ class StatusData < Struct.new(:mailbox, :attr)
# [Note]
# When the #sender and #reply_to fields are absent or empty, they will
# return the same value as #from. Also, fields may return values that are
# invalid for well-formed [RFC5322[https://tools.ietf.org/html/rfc5322]]
# invalid for well-formed [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]]
# messages when the message is malformed or a draft message.
#
# See [{IMAP4rev1 §7.4.2}[https://www.rfc-editor.org/rfc/rfc3501.html#section-7.4.2]]
# and [{IMAP4rev2 §7.5.2}[https://www.rfc-editor.org/rfc/rfc9051.html#section-7.5.2]]
# See [{IMAP4rev1 §7.4.2}[https://www.rfc-editor.org/rfc/rfc3501#section-7.4.2]]
# and [{IMAP4rev2 §7.5.2}[https://www.rfc-editor.org/rfc/rfc9051#section-7.5.2]]
# for full description of the envelope fields, and
# Net::IMAP@Message+envelope+and+body+structure for other relevant RFCs.
#
Expand All @@ -583,7 +583,7 @@ class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
# Returns a string that represents the +Date+ header.
#
# [Note]
# For a well-formed [RFC5322[https://tools.ietf.org/html/rfc5322]]
# For a well-formed [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]]
# message, the #date field must not be +nil+. However it can be +nil+
# for a malformed or draft message.

Expand All @@ -609,7 +609,7 @@ class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
# returns +nil+ for this envelope field.
#
# [Note]
# For a well-formed [RFC5322[https://tools.ietf.org/html/rfc5322]]
# For a well-formed [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]]
# message, the #from field must not be +nil+. However it can be +nil+
# for a malformed or draft message.

Expand All @@ -622,7 +622,7 @@ class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
# [Note]
# If the <tt>Sender</tt> header is absent, or is present but empty, the
# server sets this field to be the same value as #from. Therefore, in a
# well-formed [RFC5322[https://tools.ietf.org/html/rfc5322]] message,
# well-formed [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]] message,
# the #sender envelope field must not be +nil+. However it can be
# +nil+ for a malformed or draft message.

Expand All @@ -636,7 +636,7 @@ class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
# [Note]
# If the <tt>Reply-To</tt> header is absent, or is present but empty,
# the server sets this field to be the same value as #from. Therefore,
# in a well-formed [RFC5322[https://tools.ietf.org/html/rfc5322]]
# in a well-formed [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]]
# message, the #reply_to envelope field must not be +nil+. However it
# can be +nil+ for a malformed or draft message.

Expand Down Expand Up @@ -665,7 +665,7 @@ class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
# Returns a string that represents the <tt>In-Reply-To</tt> header.
#
# [Note]
# For a well-formed [RFC5322[https://tools.ietf.org/html/rfc5322]]
# For a well-formed [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]]
# message, the #in_reply_to field, if present, must not be empty. But
# it can still return an empty string for malformed messages.
#
Expand All @@ -681,7 +681,7 @@ class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
# Returns a string that represents the <tt>Message-ID</tt>.
#
# [Note]
# For a well-formed [RFC5322[https://tools.ietf.org/html/rfc5322]]
# For a well-formed [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]]
# message, the #message_id field, if present, must not be empty. But it
# can still return an empty string for malformed messages.
#
Expand All @@ -698,7 +698,7 @@ class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
# === Group syntax
#
# When the #host field is +nil+, this is a special form of address structure
# that indicates the [RFC5322[https://tools.ietf.org/html/rfc5322]] group
# that indicates the [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]] group
# syntax. If the #mailbox name field is also +nil+, this is an end-of-group
# marker (semicolon in RFC-822 syntax). If the #mailbox name field is
# non-+NIL+, this is the start of a group marker, and the mailbox #name
Expand All @@ -708,7 +708,7 @@ class Address < Struct.new(:name, :route, :mailbox, :host)
# method: name
# :call-seq: name -> string or nil
#
# Returns the [RFC5322[https://tools.ietf.org/html/rfc5322]] address
# Returns the [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]] address
# +display-name+ (or the mailbox +phrase+ in the RFC-822 grammar).

##
Expand All @@ -718,28 +718,28 @@ class Address < Struct.new(:name, :route, :mailbox, :host)
# Returns the route from RFC-822 route-addr.
#
# Note:: Generating this obsolete route addressing syntax is not allowed
# by [RFC5322[https://tools.ietf.org/html/rfc5322]]. However,
# by [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]]. However,
# addresses with this syntax must still be accepted and parsed.

##
# method: mailbox
# :call-seq: mailbox -> string or nil
#
# Returns the [RFC5322[https://tools.ietf.org/html/rfc5322]] address
# Returns the [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]] address
# +local-part+, if #host is not +nil+.
#
# When #host is +nil+, this returns
# an [RFC5322[https://tools.ietf.org/html/rfc5322]] group name and a +nil+
# an [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]] group name and a +nil+
# mailbox indicates the end of a group.

##
# method: host
# :call-seq: host -> string or nil
#
# Returns the [RFC5322[https://tools.ietf.org/html/rfc5322]] addr-spec
# Returns the [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]] addr-spec
# +domain+ name.
#
# +nil+ indicates [RFC5322[https://tools.ietf.org/html/rfc5322]] group
# +nil+ indicates [RFC5322[https://www.rfc-editor.org/rfc/rfc5322]] group
# syntax.
end

Expand All @@ -751,14 +751,14 @@ class ContentDisposition < Struct.new(:dsp_type, :param)
# :call-seq: dsp_type -> string
#
# Returns the content disposition type, as defined by
# [DISPOSITION[https://tools.ietf.org/html/rfc2183]].
# [DISPOSITION[https://www.rfc-editor.org/rfc/rfc2183]].

##
# method: param
# :call-seq: param -> hash
#
# Returns a hash representing parameters of the Content-Disposition
# field, as defined by [DISPOSITION[https://tools.ietf.org/html/rfc2183]].
# field, as defined by [DISPOSITION[https://www.rfc-editor.org/rfc/rfc2183]].
end

# Net::IMAP::ThreadMember represents a thread-node returned
Expand Down Expand Up @@ -797,8 +797,8 @@ def all_seqnos(node = self)
# FetchData#attr value. Although these classes don't share a base class,
# this module can be used to pattern match all of them.
#
# See {[IMAP4rev1] §7.4.2}[https://www.rfc-editor.org/rfc/rfc3501.html#section-7.4.2]
# and {[IMAP4rev2] §7.5.2}[https://www.rfc-editor.org/rfc/rfc9051.html#section-7.5.2-4.9]
# See {[IMAP4rev1] §7.4.2}[https://www.rfc-editor.org/rfc/rfc3501#section-7.4.2]
# and {[IMAP4rev2] §7.5.2}[https://www.rfc-editor.org/rfc/rfc9051#section-7.5.2-4.9]
# for full description of all +BODYSTRUCTURE+ fields, and also
# Net::IMAP@Message+envelope+and+body+structure for other relevant RFCs.
#
Expand All @@ -820,8 +820,8 @@ module BodyStructure
# message parts, unless they have a <tt>Content-Type</tt> that is handled by
# BodyTypeText, BodyTypeMessage, or BodyTypeMultipart.
#
# See {[IMAP4rev1] §7.4.2}[https://www.rfc-editor.org/rfc/rfc3501.html#section-7.4.2]
# and {[IMAP4rev2] §7.5.2}[https://www.rfc-editor.org/rfc/rfc9051.html#section-7.5.2-4.9]
# See {[IMAP4rev1] §7.4.2}[https://www.rfc-editor.org/rfc/rfc3501#section-7.4.2]
# and {[IMAP4rev2] §7.5.2}[https://www.rfc-editor.org/rfc/rfc9051#section-7.5.2-4.9]
# for full description of all +BODYSTRUCTURE+ fields, and also
# Net::IMAP@Message+envelope+and+body+structure for other relevant RFCs.
#
Expand All @@ -838,45 +838,45 @@ class BodyTypeBasic < Struct.new(:media_type, :subtype,
# :call-seq: media_type -> string
#
# The top-level media type as defined in
# [MIME-IMB[https://tools.ietf.org/html/rfc2045]].
# [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]].

##
# method: subtype
# :call-seq: subtype -> string
#
# The media subtype name as defined in
# [MIME-IMB[https://tools.ietf.org/html/rfc2045]].
# [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]].

##
# method: param
# :call-seq: param -> string
#
# Returns a hash that represents parameters as defined in
# [MIME-IMB[https://tools.ietf.org/html/rfc2045]].
# [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]].

##
# method: content_id
# :call-seq: content_id -> string
#
# Returns a string giving the content id as defined
# in [MIME-IMB[https://tools.ietf.org/html/rfc2045]]
# {§7}[https://tools.ietf.org/html/rfc2045#section-7].
# in [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]]
# {§7}[https://www.rfc-editor.org/rfc/rfc2045#section-7].

##
# method: description
# :call-seq: description -> string
#
# Returns a string giving the content description as defined
# in [MIME-IMB[https://tools.ietf.org/html/rfc2045]]
# {§8}[https://tools.ietf.org/html/rfc2045#section-8].
# in [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]]
# {§8}[https://www.rfc-editor.org/rfc/rfc2045#section-8].

##
# method: encoding
# :call-seq: encoding -> string
#
# Returns a string giving the content transfer encoding as defined
# in [MIME-IMB[https://tools.ietf.org/html/rfc2045]]
# {§6}[https://tools.ietf.org/html/rfc2045#section-6].
# in [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]]
# {§6}[https://www.rfc-editor.org/rfc/rfc2045#section-6].

##
# method: size
Expand All @@ -889,15 +889,15 @@ class BodyTypeBasic < Struct.new(:media_type, :subtype,
# :call-seq: md5 -> string
#
# Returns a string giving the body MD5 value as defined in
# [MD5[https://tools.ietf.org/html/rfc1864]].
# [MD5[https://www.rfc-editor.org/rfc/rfc1864]].

##
# method: disposition
# :call-seq: disposition -> ContentDisposition
#
# Returns a ContentDisposition object giving the content
# disposition, as defined by
# [DISPOSITION[https://tools.ietf.org/html/rfc2183]].
# [DISPOSITION[https://www.rfc-editor.org/rfc/rfc2183]].

##
# method: language
Expand Down Expand Up @@ -1065,7 +1065,7 @@ class BodyTypeMultipart < Struct.new(:media_type, :subtype,
# call-seq: subtype -> string
#
# Returns the content subtype name
# as defined in [MIME-IMB[https://tools.ietf.org/html/rfc2045]].
# as defined in [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]].

##
# method: parts
Expand All @@ -1079,7 +1079,7 @@ class BodyTypeMultipart < Struct.new(:media_type, :subtype,
# call-seq: param -> hash
#
# Returns a hash that represents parameters
# as defined in [MIME-IMB[https://tools.ietf.org/html/rfc2045]].
# as defined in [MIME-IMB[https://www.rfc-editor.org/rfc/rfc2045]].

##
# method: disposition
Expand Down
2 changes: 1 addition & 1 deletion lib/net/imap/sasl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class IMAP

# Pluggable authentication mechanisms for protocols which support SASL
# (Simple Authentication and Security Layer), such as IMAP4, SMTP, LDAP, and
# XMPP. {RFC-4422}[https://tools.ietf.org/html/rfc4422] specifies the
# XMPP. {RFC-4422}[https://www.rfc-editor.org/rfc/rfc4422] specifies the
# common \SASL framework:
# >>>
# SASL is conceptually a framework that provides an abstraction layer
Expand Down
6 changes: 3 additions & 3 deletions lib/net/imap/sasl/anonymous_authenticator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ class IMAP < Protocol
module SASL

# Authenticator for the "+ANONYMOUS+" SASL mechanism, as specified by
# RFC-4505[https://tools.ietf.org/html/rfc4505]. See
# RFC-4505[https://www.rfc-editor.org/rfc/rfc4505]. See
# Net::IMAP#authenticate.
class AnonymousAuthenticator

# An optional token sent for the +ANONYMOUS+ mechanism., up to 255 UTF-8
# characters in length.
#
# If it contains an "@" sign, the message must be a valid email address
# (+addr-spec+ from RFC-2822[https://tools.ietf.org/html/rfc2822]).
# (+addr-spec+ from RFC-2822[https://www.rfc-editor.org/rfc/rfc2822]).
# Email syntax is _not_ validated by AnonymousAuthenticator.
#
# Otherwise, it can be any UTF8 string which is permitted by the
Expand All @@ -25,7 +25,7 @@ class AnonymousAuthenticator
# new(anonymous_message: "", **) -> authenticator
#
# Creates an Authenticator for the "+ANONYMOUS+" SASL mechanism, as
# specified in RFC-4505[https://tools.ietf.org/html/rfc4505]. To use
# specified in RFC-4505[https://www.rfc-editor.org/rfc/rfc4505]. To use
# this, see Net::IMAP#authenticate or your client's authentication
# method.
#
Expand Down
6 changes: 3 additions & 3 deletions lib/net/imap/sasl/cram_md5_authenticator.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# frozen_string_literal: true

# Authenticator for the "+CRAM-MD5+" SASL mechanism, specified in
# RFC2195[https://tools.ietf.org/html/rfc2195]. See Net::IMAP#authenticate.
# RFC2195[https://www.rfc-editor.org/rfc/rfc2195]. See Net::IMAP#authenticate.
#
# == Deprecated
#
# +CRAM-MD5+ is obsolete and insecure. It is included for compatibility with
# existing servers.
# {draft-ietf-sasl-crammd5-to-historic}[https://tools.ietf.org/html/draft-ietf-sasl-crammd5-to-historic-00.html]
# {draft-ietf-sasl-crammd5-to-historic}[https://www.rfc-editor.org/rfc/draft-ietf-sasl-crammd5-to-historic-00.html]
# recommends using +SCRAM-*+ or +PLAIN+ protected by TLS instead.
#
# Additionally, RFC8314[https://tools.ietf.org/html/rfc8314] discourage the use
# Additionally, RFC8314[https://www.rfc-editor.org/rfc/rfc8314] discourage the use
# of cleartext and recommends TLS version 1.2 or greater be used for all
# traffic. With TLS +CRAM-MD5+ is okay, but so is +PLAIN+
class Net::IMAP::SASL::CramMD5Authenticator
Expand Down
16 changes: 8 additions & 8 deletions lib/net/imap/sasl/digest_md5_authenticator.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# frozen_string_literal: true

# Net::IMAP authenticator for the +DIGEST-MD5+ SASL mechanism type, specified
# in RFC-2831[https://tools.ietf.org/html/rfc2831]. See Net::IMAP#authenticate.
# in RFC-2831[https://www.rfc-editor.org/rfc/rfc2831]. See Net::IMAP#authenticate.
#
# == Deprecated
#
# "+DIGEST-MD5+" has been deprecated by
# RFC-6331[https://tools.ietf.org/html/rfc6331] and should not be relied on for
# RFC-6331[https://www.rfc-editor.org/rfc/rfc6331] and should not be relied on for
# security. It is included for compatibility with existing servers.
class Net::IMAP::SASL::DigestMD5Authenticator
DataFormatError = Net::IMAP::DataFormatError
Expand Down Expand Up @@ -37,10 +37,10 @@ class Net::IMAP::SASL::DigestMD5Authenticator

# Authentication identity: the identity that matches the #password.
#
# RFC-2831[https://tools.ietf.org/html/rfc2831] uses the term +username+.
# RFC-2831[https://www.rfc-editor.org/rfc/rfc2831] uses the term +username+.
# "Authentication identity" is the generic term used by
# RFC-4422[https://tools.ietf.org/html/rfc4422].
# RFC-4616[https://tools.ietf.org/html/rfc4616] and many later RFCs abbreviate
# RFC-4422[https://www.rfc-editor.org/rfc/rfc4422].
# RFC-4616[https://www.rfc-editor.org/rfc/rfc4616] and many later RFCs abbreviate
# this to +authcid+.
attr_reader :username
alias authcid username
Expand Down Expand Up @@ -85,15 +85,15 @@ class Net::IMAP::SASL::DigestMD5Authenticator
# must be set appropriately to use authenticators in other protocols.
#
# If an IANA-registered name isn't available, GSS-API
# (RFC-2743[https://tools.ietf.org/html/rfc2743]) allows the generic name
# (RFC-2743[https://www.rfc-editor.org/rfc/rfc2743]) allows the generic name
# "host".
attr_reader :service

# The generic server name when the server is replicated.
#
# +service_name+ will be ignored when it is +nil+ or identical to +host+.
#
# From RFC-2831[https://tools.ietf.org/html/rfc2831]:
# From RFC-2831[https://www.rfc-editor.org/rfc/rfc2831]:
# >>>
# The service is considered to be replicated if the client's
# service-location process involves resolution using standard DNS lookup
Expand Down Expand Up @@ -176,7 +176,7 @@ def initialize(user = nil, pass = nil, authz = nil,
@nc, @stage = {}, STAGE_ONE
end

# From RFC-2831[https://tools.ietf.org/html/rfc2831]:
# From RFC-2831[https://www.rfc-editor.org/rfc/rfc2831]:
# >>>
# Indicates the principal name of the service with which the client wishes
# to connect, formed from the serv-type, host, and serv-name. For
Expand Down
Loading
Loading