发信人: kenmlee() 
整理人: kenmlee(2000-07-08 16:48:55), 站内信件
 | 
 
 
3.2.2 http URL
 
 #3.2.2 http的URL/#
 
    The "http" scheme is used to locate network resources via the HTTP
  
    protocol. This section defines the scheme-specific syntax and
    semantics for http URLs.
 
 #  "http"用于在HTTP协议中定位网络资源,本节定义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
 
 #         http_URL       = "http:" "//" host [ ":" port ] [ abs_path ] 
 
 
           host           = <合法的 Internet 主机域名或 IP 地址(点十进制 
 ),
                             参见 RFC 1123 的2.1节定义>
 
           port           = *DIGIT
 /#
 
    If the port is empty or not given, port 80 is assumed. The semantic 
 s
    are that the identified resource is located at the server listening 
 
    for TCP connections on that port of that host, and the Request-URI
  
    for the resource is abs_path. The use of IP addresses in URL's SHOU 
 LD
    be avoided whenever possible (see RFC 1900 [24]). If the abs_path i 
 s
    not present in the URL, it MUST be given as "/" when used as a
    Request-URI for a resource (section 5.1.2).
 
 #  如果未指定端口,则默认为80端口.意指指定的资源位于在该主机该端口侦听的 
 TCP连接
    服务上,请求URI是资源的绝对路径(abs_path).在URL中使用IP地址应该(SHOU 
 LD)尽可
    能避免(参见 RFC 1900 [24]).如果绝对路径未在URL中指定,在作为资源的请 
 求URI时
    必须(MUST)用"/"标示.
 /#
 
 3.2.3 URI Comparison
 
 #3.2.3 URI比较/#
 
    When comparing two URIs to decide if they match or not, a client
    SHOULD use a case-sensitive octet-by-octet comparison of the entire 
 
    URIs, with these exceptions:
 
 #  当比较两个URI以决定两者是否相同时,客户应用程序应该(SHOULD)用整个URI 
 按
    大小写敏感的字节比较,除非:
 /#
 
      o  A port that is empty or not given is equivalent to the default 
 
         port for that URI;
 
      o  Comparisons of host names MUST be case-insensitive;
 
      o  Comparisons of scheme names MUST be case-insensitive;
 
      o  An empty abs_path is equivalent to an abs_path of "/".
 
 #    o  端口为空或未给定则与该URI的缺省端口相同;
 
      o  主机名的比较必须(MUST)是大小写不敏感的;
 
      o  协议名的比较必须(MUST)是大小些不敏感的;
 
      o  空的绝对路径(abs_path)等于绝对路径"/".
 /#
 
    Characters other than those in the "reserved" and "unsafe" sets (se 
 e
    section 3.2) are equivalent to their ""%" HEX HEX" encodings.
 
 #  除了"保留"(reserved)和"不安全"(unsafe)字符集中的字符外,其它字符与它 
 们的
    ""%" HEX HEX"编码形式相同,参见3.2节.
 /#
 
    For example, the following three URIs are equivalent:
 
          http://abc.com:80/~smith/home.html
          http://ABC.com/%7Esmith/home.html
          http://ABC.com:/%7esmith/home.html
 
 #  例如以下三个URI是相同的:
 
          http://abc.com:80/~smith/home.html
          http://ABC.com/%7Esmith/home.html
          http://ABC.com:/%7esmith/home.html
 /#
 
 3.3 Date/Time Formats
 
 #3.3 日期/时间格式/#
 
 3.3.1 Full Date
 
 #3.3.1 完整日期/#
 
    HTTP applications have historically allowed three different formats 
 
    for the representation of date/time stamps:
 
           Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 822, updated by RFC 112 
 3
           Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1 
 036
           Sun Nov  6 08:49:37 1994       ; ANSI C's asctime() format
 
 #  由于历史原因HTTP应用允许使用三种不同的表示日期/时间戳的方式:
 
           Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 822, RFC 1123 之更新
           Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, RFC 1036 废除
           Sun Nov  6 08:49:37 1994       ; ANSI C 的 asctime() 格式
 /#
 
    The first format is preferred as an Internet standard and represent 
 s
    a fixed-length subset of that defined by RFC 1123  (an update to RF 
 C
    822).  The second format is in common use, but is based on the
    obsolete RFC 850 [12] date format and lacks a four-digit year.
    HTTP/1.1 clients and servers that parse the date value MUST accept
  
    all three formats (for compatibility with HTTP/1.0), though they MU 
 ST
    only generate the RFC 1123 format for representing HTTP-date values 
 
    in header fields.
 
 #  第一种格式被推荐作为Internet标准使用,是RFC1123(对RFC822的更新)定义的 
 
    固定长度子集.一般使用第二种格式,但是基于废除了的RFC850日期格式并且缺 
 少
    四位数的年份.HTTP/1.1客户和服务器在解析日期值时必须接受所有三种格式 
 
    (与HTTP/1.0兼容),但他们必须只能在头域中生成RFC1123格式的HTTP日期值表 
 示.
 /#
 
      Note: Recipients of date values are encouraged to be robust in
      accepting date values that may have been sent by non-HTTP
      applications, as is sometimes the case when retrieving or posting 
 
      messages via proxies/gateways to SMTP or NNTP.
 
 #    注意:日期值的接收者应该更加小心程序在接受日期值时的鲁棒性,因为这些 
 日期
      可能是由非HTTP协议的应用程序发出的,例如当通过代理或网关存取SMTP或 
 NNTP
      的消息时.
 /#
 
    All HTTP date/time stamps MUST be represented in Greenwich Mean Tim 
 e
    (GMT), without exception. This is indicated in the first two format 
 s
    by the inclusion of "GMT" as the three-letter abbreviation for time 
 
    zone, and MUST be assumed when reading the asctime format.
 
 #  所有的HTTP日期/时间戳必须无意外的用格陵威治标准时间(GMT)表示.前两种 
 格式
    通过在时区位置用"GMT"指出,asctime格式必须默认为GMT时区.
 /#
 
           HTTP-date    = rfc1123-date | rfc850-date | asctime-date
 
           rfc1123-date = wkday "," SP date1 SP time SP "GMT"
           rfc850-date  = weekday "," SP date2 SP time SP "GMT"
           asctime-date = wkday SP date3 SP time SP 4DIGIT
 
           date1        = 2DIGIT SP month SP 4DIGIT
                          ; day month year (e.g., 02 Jun 1982)
           date2        = 2DIGIT "-" month "-" 2DIGIT
                          ; day-month-year (e.g., 02-Jun-82)
           date3        = month SP ( 2DIGIT | ( SP 1DIGIT ))
                          ; month day (e.g., Jun  2)
 
           time         = 2DIGIT ":" 2DIGIT ":" 2DIGIT
                          ; 00:00:00 - 23:59:59
 
           wkday        = "Mon" | "Tue" | "Wed"
                        | "Thu" | "Fri" | "Sat" | "Sun"
 
           weekday      = "Monday" | "Tuesday" | "Wednesday"
                        | "Thursday" | "Friday" | "Saturday" | "Sunday" 
 
 
           month        = "Jan" | "Feb" | "Mar" | "Apr"
                        | "May" | "Jun" | "Jul" | "Aug"
                        | "Sep" | "Oct" | "Nov" | "Dec"
 
 #	  HTTP-date    = rfc1123-date | rfc850-date | asctime-date
 
           rfc1123-date = wkday "," SP date1 SP time SP "GMT"
           rfc850-date  = weekday "," SP date2 SP time SP "GMT"
           asctime-date = wkday SP date3 SP time SP 4DIGIT
 
           date1        = 2DIGIT SP month SP 4DIGIT
                          ; 日 月 年 (e.g., 02 Jun 1982)
           date2        = 2DIGIT "-" month "-" 2DIGIT
                          ; 日-月-年 (e.g., 02-Jun-82)
           date3        = month SP ( 2DIGIT | ( SP 1DIGIT ))
                          ; 月 日 (e.g., Jun  2)
 
           time         = 2DIGIT ":" 2DIGIT ":" 2DIGIT
                          ; 00:00:00 - 23:59:59
 
           wkday        = "Mon" | "Tue" | "Wed"
                        | "Thu" | "Fri" | "Sat" | "Sun"
 
           weekday      = "Monday" | "Tuesday" | "Wednesday"
                        | "Thursday" | "Friday" | "Saturday" | "Sunday" 
 
 
           month        = "Jan" | "Feb" | "Mar" | "Apr"
                        | "May" | "Jun" | "Jul" | "Aug"
                        | "Sep" | "Oct" | "Nov" | "Dec"
 /#
 
      Note: HTTP requirements for the date/time stamp format apply only 
 
      to their usage within the protocol stream. Clients and servers ar 
 e
      not required to use these formats for user presentation, request
  
      logging, etc.
 
 #    注意:HTTP要求的日期/时间戳仅仅用于协议的数据流中,客户和服务器不被 
 强制使用
      这些格式表示用户数据,请求日志等.
 /#     
 
 3.3.2 Delta Seconds
 
 #3.3.2 Delta秒 /#
 
    Some HTTP header fields allow a time value to be specified as an
    integer number of seconds, represented in decimal, after the time
    that the message was received.
 
           delta-seconds  = 1*DIGIT
 
 #  一些HTTP头域允许用秒的整数值作为时间值,用十进制表示,在消息收到后给 
 出。
 
           delta-seconds  = 1*DIGIT
 /#
 
 
 -- ※ 修改:.kenmlee 于 Jul  8 16:23:48 修改本文.[FROM: 61.140.188.222] ※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 61.140.188.222]
  | 
 
 
 |