SP
Request-URI SP
HTTP/1.0
CRLF
CRLF
indicating the end of the header fields
GET
or POST
. In limited circumstances, when the user wants only updates from a standard area, he may use GET
method. Normally, use POST
.
URI
(especially when the request is being made to a proxy)
Normally a few headers always have to be specified.
text/x-packed-dat
, text/x-syn
. In version 1.0, only text/x-packed-dat
is expected.
Authorization: Basic Y2xhbXM6Y2hvd2Rlcg==
POST
method. The header specifies the size of the request message body in bytes.
POST
method. The header tells what exactly request's message body is. Acceptable values are: text/x-request-mfr
, application/octet-stream
??
F*.dat
files would be delievered. The header tells area's tags: full and short (folder) names, area's id, grid spacing and projection.
From: user@us.navy.mil
Host: nites-2
Host: 10.10.10.202:80
If-Modified-Since: Thu, 01 Dec 1994 16:00:00 GMT
Range: lats=; lons=100-120 "10.0N 20.0S 100.1E 120W"
If-Match: "xyzzy" area dimensions?
Pragma: token [ "=" ( token | quoted-string ) ]
HTTP/1.0
SP
Status-Code SP
Reason-Phrase CRLF
Status-Line
, consisting of
the protocol version followed by a numeric status code and its
associated textual phrase, with each element separated by SP
characters.
No CR
or LF
is allowed except in the final CRLF
sequence.
CRLF
indicating the end of the header fields
4xx
or 5xx
status code is received, the user ought to be alerted of an error.
WWW-Authenticate
header that must be present in the present response, ask the user for more credentials, and repeat the request with the proper Authorization
header; see section 10.4.2 of the standard
Accept
request header, and usually parameterized with the area name etc. parameters as approriate.Content-Type: text/x-packed-dat; AREA="NORF"
Content-Encoding
and Transfer-Encoding
gzip
, compress
(UNIX compress) and deflate
(zlib/pkzip)??. The client must be prepared to perform decoding/decompression of the body.
F*.dat
files would be delivered. The header tells area's tags: full and short (folder) names, area's id, grid spacing and projection. Should it rather be a parameter of the Content-Type
??
Expires
or Last-Modified
headers.Date: Tue, 15 Nov 1994 08:12:31 GMT
Last-Modified: Thu, 01 Dec 1994 16:00:00 GMT
503
(Service
Unavailable) response to indicate how long the service is expected to be
unavailable to the requesting client. The value of this field can be
either an HTTP-date or an integer number of seconds (in decimal) after
the time of the response.
Retry-After = "Retry-After" ":" ( HTTP-date | delta-seconds )
Two examples of its use are
Retry-After: Fri, 31 Dec 1999 23:59:59 GMT
Retry-After: 120
In the latter example, the delay is 2 minutes.
Pragma: token [ "=" ( token | quoted-string ) ]
Content-Type
response header specifies the kind of the weather product the message carries, and additional parameters (e.g., description of a product). If the message is multi-part, then Content-Type
is set to "multipart/mixed
"; each separate entity of the multipart message has its own set of headers describing its content, including Content-Type
and possibly Content-Length
, Content-Encoding
, etc.
If Content-Encoding
or Transfer-Encoding
response headers are present, the response body is compressed and encoded.
For more details on handling of the response message, see the description of the Metcast client, retriever
.
If the user specified that it wants to authenticate itself to the server (by checking a special option in JMV shell's Options
panel, and supplying an id and the password), the retriever module computes the basic authorization credential and submits it with the request, in the Authorization
header.
In any case, if the server replies with 401 (Unauthorized) message, the access has been denied, and that is final. We simply log the whole response (which may contain some explanation why access was denied), and quit.
Just for the reference, here is an example of browser-server interaction, when a Netscape browser tried to GET
a resource whose access was limited (by an .htaccess
file).
The client (browser) opens the connection and submits the request:
GET /resourse/ HTTP/1.0 Connection: Keep-Alive User-Agent: Mozilla/3.0 (Macintosh; I; 68K) Host: 10.10.10.202:4001 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* [An empty line]The server replies:
HTTP/1.0 401 Unauthorized Server: Netscape-Communications/1.12 Date: Tuesday, 11-Feb-97 00:30:41 GMT WWW-authenticate: basic realm="Earls Clams" Content-type: text/html Content-length: 223 <HTML><HEAD><TITLE>Unauthorized</TITLE></HEAD> <BODY><H1>Unauthorized</H1> Proper authorization is required for this area. Either your browser does not perform authorization, or your authorization has failed. </BODY></HTML>and closes the connection.
The (Netscape) browser displays a dialog asking the user to enter an id and a password. After that, the browser opens the connecton again and resubmits the request, this time including the Authorization
header:
GET /resource/ HTTP/1.0 Connection: Keep-Alive User-Agent: Mozilla/3.0 (Macintosh; I; 68K) Host: 10.10.10.202:4001 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* Authorization: Basic Y2xhbXM6Y2hvd2Rlcg== [An empty line]The authorization was invalid, and the server simply closed the connection. Obviously the server was too rude (or obsolete): it should have sent the
401
response again.
POST http://nites-2/cgi-bin/server HTTP/1.0 Accept: text/x-packed-dat Host: nites-2 Content-Length: 100 Content-Type: text/x-request-mfr User-Agent: JMV/1.8 NORF CURRENTDTG JMV 1.7.0f 19961025 1 96CC011NOG A01 45.000N 099.000W 024 023 026 01.0 001.0OM
HTTP/1.0 200 OK Server: Netscape-Communications/1.12 Date: Tuesday, 21-Jan-97 23:57:25 GMT Last-modified: Tuesday, 21-Jan-97 23:17:59 GMT Content-length: 1841 Content-type: text/x-packed-dat; AREA="NORF" PACKED.DAT 97012000 METXA01 00242000 9701 MSGID/FNOC/GRIDFLD/0001/JAN PROD/OCEANMET/200000Z2/JAN/024/1OF1/A01 NOGAPS GRID/4500N9/09900W8//026/023//1.00DEG/1.00DEG//08 CMPCT/BS1/0.10103E 04/0.14474E-01 NARR/24 HR FCST FM 00Z 20JAN97 KTOSROUDW0Y60P1I1U2C293P2W1S040CYXWYUHRDM0JVG2DLBLAAJJMOQTTMV7Z8Z8Z8 YDZW0016293V3K2P1X1H0QY1WLTQQXOHKZH3EACJBUHTK2PSSSU6W9YZ0H1V2V8G8G8G .... VU3A7X1Y4U6B9WAC34DOD1EYAL5AZWY2ZLXPWZRSQVVUXRZRTVWU9IGPKCBMGRVTVTVT ENDAT END OF DOWNLOAD
POST http://nites-2/cgi-bin/server HTTP/1.0 Accept: text/x-packed-dat; text/x-syn Host: nites-2 Content-Length: 332 Content-Type: text/x-request-mfr User-Agent: JMV/1.8 BIG area CURRENTDTG JMV 1.8.Xa 4 973EC11XXX SYN 80.000N 025.000W 000 235 393 00.5 000.5OM 973EC11XXX MZZ 80.000N 025.000W 000 025 041 05.0 005.0OM 973EC12NOG A01 79.000N 022.500W 000 079 133 01.5 001.5OM 973EC22NOG A01 39.000S 022.500W 000 001 133 01.5 001.5OM 976AC13XXX SVN 0 1 9999 9999 105050000 0000 0000 0000 0000000B
HTTP/1.0 200 OK Server: Netscape-Communications/1.12 Date: Tuesday, 21-Jan-97 23:57:25 GMT Content-Type: multipart/mixed; boundary="boundary-JMVVMJ yradnuob" --boundary-JMVVMJ yradnuob Content-type: text/x-syn; area="BIGAREA" Content-length: 193 DGAA 5.6 -0.2***************************************11 5 METAR 560 -16 871488000 871495200 654720 DGAA ACCRA/KOTOKA INTL METAR DGAA 131600Z 23008KT 9999 FEW018 BKN120 27/22 Q10// --boundary-JMVVMJ yradnuob Last-modified: Tuesday, 21-Jan-97 23:17:59 GMT Content-type: image/x-portable-graymap; AREA="BIGAREA"; KIND="SVN"; Description="North Atlantic Satellite (VIS)"; TIMESTAMP=871056746 P5 800 800 255 JJ...sat-data... --boundary-JMVVMJ yradnuob Content-type: text/x-packed-dat; area="BIGAREA" Last-modified: Tuesday, 21-Jan-97 23:17:59 GMT Content-length: 1841 PACKED.DAT 97012000 METXA01 00242000 9701 ...etc... ENDAT END OF DOWNLOADAlso of note...
Content-Encoding: gzip Content-Length: 3495 Date: Wed, 15 Nov 1995 06:25:24 GMT Expires: Thu, 01 Dec 1994 16:00:00 GMT HTTP/1.1 206 Partial content Date: Wed, 15 Nov 1995 06:25:24 GMT Last-modified: Wed, 15 Nov 1995 04:58:08 GMT Content-Range: bytes 21010-47021/47022 Content-Length: 26012 Content-Type: image/gif