最終更新日:1999年 9月 5日(日)

RFC からの抜粋


RFC821: Simple Mail Transfer Protocol
「4. The SMTP Specifications」より
4.1.2 COMMAND SYNTAX
<path>          ::= "<" [ <a-d-l> ":" ] <mailbox> ">"

<a-d-l>         ::= <at-domain> | <at-domain> "," <a-d-l>
<at-domain>     ::= "@" <domain>
<domain>        ::=  <element> | <element> "." <domain>
<element>       ::= <name> | "#" <number> | "[" <dotnum> "]"

<mailbox>       ::= <local-part> "@" <domain>
<local-part>    ::= <dot-string> | <quoted-string>

<name>          ::= <a> <ldh-str> <let-dig>
<ldh-str>       ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>
<let-dig>       ::= <a> | <d>
<let-dig-hyp>   ::= <a> | <d> | "-"

<dot-string>    ::= <string> | <string> "." <dot-string>
<string>        ::= <char> | <char> <string>

<quoted-string> ::=  """ <qtext> """
<qtext>         ::=  "\" <x> | "\" <x> <qtext> | <q> | <q> <qtext>

<char>          ::= <c> | "\" <x>
<dotnum>        ::= <snum> "." <snum> "." <snum> "." <snum>
<number>        ::= <d> | <d> <number>

<CRLF>          ::= <CR> <LF>
<CR>            ::= the carriage return character (ASCII code 13)
<LF>            ::= the line feed character (ASCII code 10)
<SP>            ::= the space character (ASCII code 32)

<snum>          ::= one, two, or three digits representing a decimal
                      integer value in the range 0 through 255

<a>             ::= any one of the 52 alphabetic characters A through Z
                      in upper case and a through z in lower case

<c>             ::= any one of the 128 ASCII characters, but not any
                      <special> or <SP>

<d>             ::= any one of the ten digits 0 through 9

<q>             ::= any one of the 128 ASCII characters except <CR>,
                      <LF>, quote ("), or backslash (\)

<x>             ::= any one of the 128 ASCII characters (no exceptions)

<special>       ::= "<" | ">" | "(" | ")" | "[" | "]" | "\" | "."
                      | "," | ";" | ":" | "@"  """ | the control
                      characters (ASCII codes 0 through 31 inclusive and
                      127)

関連 RFC : 788( 改定前のRFC ),  
822( ARPA ), 793( TCP )

注 この表記は SMTP での通信上の表記であり、
  ニックネームやエイリアス名は含まれない。


RFC2068: Hypertext Transfer Protocol -- HTTP/1.1
「3.2 Uniform Resource Identifiers」より
3.2.1 General Syntax
URI            = ( absoluteURI | relativeURI ) [ "#" fragment ]

absoluteURI    = scheme ":" *( uchar | reserved )

relativeURI    = net_path | abs_path | rel_path

net_path       = "//" net_loc [ abs_path ]
abs_path       = "/" rel_path
rel_path       = [ path ] [ ";" params ] [ "?" query ]

path           = fsegment *( "/" segment )
fsegment       = 1*pchar
segment        = *pchar

params         = param *( ";" param )
param          = *( pchar | "/" )

scheme         = 1*( ALPHA | DIGIT | "+" | "-" | "." )
net_loc        = *( pchar | ";" | "?" )

query          = *( uchar | reserved )
fragment       = *( uchar | reserved )

pchar          = uchar | ":" | "@" | "&" | "=" | "+"
uchar          = unreserved | escape
unreserved     = ALPHA | DIGIT | safe | extra | national

escape         = "%" HEX HEX
reserved       = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+"
extra          = "!" | "*" | "'" | "(" | ")" | ","
safe           = "$" | "-" | "_" | "."
unsafe         = CTL | SP | <"> | "#" | "%" | "<" | ">"
national       = <any OCTET excluding ALPHA, DIGIT,
                 reserved, extra, safe, and unsafe>

関連 RFC : 1738, 1808

注 RFC 自体には URI の長さの制限はないが
  古いサーバでは 256Byte 未満でないと
   414 のエラーが返るものがある(らしい)


3.2.2 http URL
http_URL       = "http:" "//" host [ ":" port ] [ abs_path ]

host           = <A legal Internet host domain name
                 or IP address (in dotted-decimal form),
                 as defined by Section 2.1 of RFC 1123>

port           = *DIGIT

関連 RFC : 1123, 1900


戻る (C)Copyright 1999 ShinSoft. All rights reserved. メール