Légende: entre <kbd></kdb>, les lignes de commande
entrées. Entre <var></var>, la réponse
du serveur. Le reste <code></code> est du code ou shell
sans grand intérêt
.
Test de connexion simple et de récupération d'une page:
[obogdan@asi1246 obogdan]$
telnet www.serveurperso.com
80
Trying 212.194.183.136...
Connected to www.serveurperso.com.
Escape character is '^]'.
GET /index.php HTTP/1.1
Host: www.serveurperso.com
HTTP/1.1 200 OK
Date: Tue, 11 Feb 2003 09:13:21 GMT
Server: Apache/1.3.27 (Win32) PHP/4.3.0
X-Powered-By: PHP/4.3.0
Transfer-Encoding: chunked
Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>
Serveur perso ! - serveurperso.com
</TITLE>
......
......
</HTML>
HTTP/1.1 200 OK
Date: Mon, 03 Mar 2003 23:22:29 GMT
Server: Apache/1.3.22 (Unix) (Red-Hat/Linux) PHP/4.1.2
Last-Modified: Thu, 06 Feb 2003 23:11:28 GMT
ETag: "1bc3a9-594-3e42eba0"
Accept-Ranges: bytes
Content-Length: 1428
Connection: close
Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
....
</html>
GET /~obogdan/index.html HTTP/1.1
Host: asi.insa-rouen.fr
If-Modified-Since: Thu, 06 Feb 2003 23:12:59 GMT
HTTP/1.1 304 Not Modified
Date: Mon, 03 Mar 2003 23:25:48 GMT
Server: Apache/1.3.22 (Unix) (Red-Hat/Linux) PHP/4.1.2
Connection: close
ETag: "1bc3a9-594-3e42eba0"
La page n'a pas été modifiée depuis la date indiqué dans la requête, le serveur nous répond en 304.
GET /~obogdan/index.html HTTP/1.1
Host: asi.insa-rouen.fr
Range: bytes=2-10
HTTP/1.1 206 Partial Content
Date: Tue, 11 Feb 2003 10:59:29 GMT
Server: Apache/1.3.22 (Unix) (Red-Hat/Linux) PHP/4.0.6
Last-Modified: Thu, 06 Feb 2003 23:11:28 GMT
ETag: "1bc3a9-594-3e42eba0"
Accept-Ranges: bytes
Content-Length: 9
Content-Range: bytes 2-10/1428
Connection: close
Content-Type: text/html
DOCTYPE HConnection closed by foreign
host.
La réponse du serveur est bien d'une longueur de 9 octets "DOCTYPE H".
HEAD /~lfallet/logo_asi HTTP/1.1
Host: asi.insa-rouen.fr
Accept: image/gif; q=1, image/png; q=0.2
HTTP/1.1 200 OK
Date: Sun, 09 Mar 2003 21:45:49 GMT
Server: Apache/1.3.22 (Unix) (Red-Hat/Linux) PHP/4.1.2
Content-Location: logo_asi.gif
Vary: negotiate,accept
TCN: choice
Last-Modified: Sun, 09 Mar 2003 21:45:12 GMT
ETag: "c43d4-21e3-3e6bb5e8;3e6bb5e8"
Accept-Ranges: bytes
Content-Length: 8675
Connection: close
Content-Type: image/gif
HEAD /~lfallet/logo_asi HTTP/1.1
Host: asi.insa-rouen.fr
Accept: image/png; q=0.8, image/gif; q=0.4
HTTP/1.1 200 OK
Date: Sun, 09 Mar 2003 21:49:14 GMT
Server: Apache/1.3.22 (Unix) (Red-Hat/Linux) PHP/4.1.2
Content-Location: logo_asi.png
Vary: negotiate,accept
TCN: choice
Last-Modified: Sun, 09 Mar 2003 21:45:12 GMT
ETag: "c43d5-16e5-3e6bb5e8;3e6bb5e8"
Accept-Ranges: bytes
Content-Length: 5861
Connection: close
Content-Type: image/png
GET / HTTP/1.1
Host: www.debian.org
Accept-Language: da;q=0.8, fr;q=0.5
HTTP/1.1 200 OK
Date: Mon, 03 Mar 2003 23:03:31 GMT
Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2
Content-Location: index.da.html
Vary: negotiate,accept-language
TCN: choice
Cache-Control: max-age=86400
Expires: Tue, 04 Mar 2003 23:03:31 GMT
Last-Modified: Mon, 03 Mar 2003 22:32:53 GMT
ETag: "1113c2-3f24-3e63d815;3e63dbd9"
Accept-Ranges: bytes
Content-Length: 16164
Content-Type: text/html
Content-Language: da
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="da">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Debian GNU/Linux -- Det universelle styresystem</title>
<link rev="made" href="mailto:webmaster@debian.org">
<link rel="shortcut icon" href="favicon.ico">
<meta name="Keywords" content="debian, GNU, linux, unix,
open source, fri, free, DFSG">
<meta name="Description" content="Debian GNU/Linux er
en fri distribution af styresystemet GNU/Linux. Den vedligeholdes og opdateres
af frivillige brugere, der donerer arbejde, tid og energi.">
<meta name="Generator" content="WML 2.0.8 (30-Oct-2001)">
<meta name="Modified" content="2003-03-03 23:32:50">
</head>
...
HEAD /~lfallet/index.htm HTTP/1.1
Host: asi.insa-rouen.fr
Connection:close
HTTP/1.1 200 OK
Date: Sun, 09 Mar 2003 21:55:26 GMT
Server: Apache/1.3.22 (Unix) (Red-Hat/Linux) PHP/4.1.2
Last-Modified: Sat, 08 Mar 2003 00:19:45 GMT
ETag: "c4392-342d-3e693721"
Accept-Ranges: bytes
Content-Length: 13357
Connection: close
Content-Type: text/html
404 Not Found
The server has not found anything matching the Request-URI. No indication
is given of whether the condition is temporary or permanent. The 410 (Gone)
status code SHOULD be used if the server knows, through some internally
configurable mechanism, that an old resource is permanently unavailable
and has no forwarding address. This status code is commonly used when the
server does not wish to reveal exactly why the request has been refused,
or when no other response is applicable.
GET /superman.php HTTP/1.1
Host: www.debian.org
HTTP/1.1 404 Not Found
Date: Mon, 03 Mar 2003 23:23:44 GMT
Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
501 Not Implemented
The server does not support the functionality required to fulfill the request.
This is the appropriate response when the server does not recognize the
request method and is not capable of supporting it for any resource.
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
^]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>501 Method Not Implemented</TITLE>
</HEAD><BODY>
<H1>Method Not Implemented</H1>
^] to /index.shtml not supported.<P>
Invalid method in request ^]<P>
<HR>
<ADDRESS>Apache-AdvancedExtranetServer/1.3.26 Server at 172.20.1.119
Port 80</ADDRESS>
</BODY></HTML>
Connection closed by foreign host.
302 Found
The requested resource resides temporarily under a different URI. Since
the redirection might be altered on occasion, the client SHOULD continue
to use the Request-URI for future requests. This response is only cacheable
if indicated by a Cache-Control or Expires header field.
GET / HTTP/1.1
Host: www.google.com
Accept-Language: da,ro
HTTP/1.1 302 Found
Content-Length: 151
Server: GWS/2.0
Content-Type: text/html
Date: Mon, 03 Mar 2003 23:26:31 GMT
Location: http://www.google.fr/
Set-Cookie: PREF=ID=0d06081051448380:TM=1046733991:LM=1046733991:S=EDPcLkqhoIHbtgXm;
expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com
<HTML><HEAD><TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.fr/">here</A>.
</BODY></HTML>