| |

5 (Request).

: , , .

           Request       = Request-Line              ;  5.1
                           *( general-header         ;  4.5
                            | request-header         ;  5.3
                            | entity-header )        ;  7.1
                           CRLF
                           [ message-body ]          ;  7.2

5.1 (Request-Line).

(Request-Line) , URI (Request-URI), CRLF. SP. (Request-Line) CR LF, CRLF.

          Request-Line   = Method SP Request-URI SP HTTP-Version CRLF

5.1.1 (Method).

, , URI (Request-URI). .

          Method         = "OPTIONS"                ;  9.2
                         | "GET"                    ;  9.3
                         | "HEAD"                   ;  9.4
                         | "POST"                   ;  9.5
                         | "PUT"                    ;  9.6
                         | "DELETE"                 ;  9.7
                         | "TRACE"                  ;  9.8
                         | extension-method

          extension-method = token

, , Allow ( 14.7). , , . 405 ( , Method Not Allowed), , , 501 ( , Not Implemented), . , , Public ( 14.35).

GET HEAD (general-purpose) . ; , , , 9.

5.1.2 URI (Request-URI).

URI (Request-URI) - (URL, 3.2), .

          Request-URI    = "*" | absoluteURI | abs_path

URI (Request-URI) . "*" , , , , . :

          OPTIONS * HTTP/1.1

absoluteURI , -. - , , . , - - , absoluteURI. - , , , IP . Request-Line , , :

          GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1

absoluteURI HTTP, HTTP/1.1 absoluteURI , HTTP/1.1 -.

Request-URI - , . URI ( 3.2.1, abs_path) Request-URI, URI (net_loc) Host. , TCP 80 "www.w3.org" :

          GET /pub/WWW/TheProject.html HTTP/1.1
          Host: www.w3.org
. , ; URI , "/" ( ).

- Request-URI, "*", - , Request-URI "*".

          OPTIONS http://www.ics.uci.edu:8001 HTTP/1.1
-
          OPTIONS * HTTP/1.1
          Host: www.ics.uci.edu:8001
8001 "www.ics.uci.edu".

Request-URI , 3.2.1. Request-URI, . Request-URI .

, , - "abs_path" URI (Request-URI), , , abs_path "*", -.

: " " - , URL . , -HTTP/1.1 -, , Request-URI.

5.2 , .

HTTP/1.1 , , - Request-URI, Host.

, (host), Host. ( 19.5.1 Host HTTP/1.1).

, , ( vanity hostnames) HTTP/1.1 :

  1. Request-URI - absoluteURI, - Request-URI. Host .
  2. Request-URI - absoluteURI, Host, Host.
  3. , 1 2 , 400 ( , Bad Request).

HTTP/1.0 , Host, (, URI - ) .

5.3 .

. , .

          request-header = Accept                   ;  14.1
                         | Accept-Charset           ;  14.2
                         | Accept-Encoding          ;  14.3
                         | Accept-Language          ;  14.4
                         | Authorization            ;  14.8
                         | From                     ;  14.22
                         | Host                     ;  14.23
                         | If-Modified-Since        ;  14.24
                         | If-Match                 ;  14.25
                         | If-None-Match            ;  14.26
                         | If-Range                 ;  14.27
                         | If-Unmodified-Since      ;  14.28
                         | Max-Forwards             ;  14.31
                         | Proxy-Authorization      ;  14.34
                         | Range                    ;  14.36
                         | Referer                  ;  14.37
                         | User-Agent               ;  14.42

(Request-header) . , (Request-header), (Request-header). (entity-header).


Copyright  ©  1998 Alex Simonoff (http://www.omsk.com/Leshik/), All Rights Reserved.


| |