Exit Zen
1 ../../exercises/http.rst:6
English
The HyperText Transfer Protocol
2 ../../exercises/http.rst:8
English
An important difference between HTTP/1.0, HTTP/1.1 and HTTP/2.0 is their utilization of the underlying transport connections. Answer the three questions below to confirm that you understand the difference between these versions of the HTTP protocol.
3 ../../exercises/http.rst:17
English
System administrators who are responsible for web servers often want to monitor these servers and check that they are running correctly. As a HTTP server uses TCP on port 80, the simplest solution is to open a TCP connection on port 80 and check that the TCP connection is accepted by the remote host. However, as HTTP/1.x is an ASCII-based protocol, it is also very easy to write a small script that downloads a web page on the server and compares its content with the expected one. Use `telnet` or `ncat` to verify that a web server is running on host `www.computer-networking.info` [#fhttp]_.
4 ../../exercises/http.rst:19
English
Instead of using `telnet` on port 80, it is also possible to use a command-line tool such as curl_. Use curl_ with the `--trace-ascii tracefile` option to store in `tracefile` all the information exchanged by curl_ when accessing the server.
5 ../../exercises/http.rst:21
English
What is the version of HTTP used by your version of curl_ ?
6 ../../exercises/http.rst:22
English
Can you explain the different headers placed by curl_ in the request ?
7 ../../exercises/http.rst:23
English
Can you explain the different headers found in the response ?
8 ../../exercises/http.rst:25
English
HTTP 1.1, specified in :rfc:`2616`, forces the client to include the `Host:` header in all its requests. HTTP 1.0 does not define the `Host:` header, but most implementations support it. By using `telnet` and `curl` retrieve the first page of the https://www.computer-networking.info web server [#fhttps]_ by sending http requests with and without the `Host:` header. Explain the difference between the two.
9 ../../exercises/http.rst:27
English
The headers sent in a HTTP request allow the client to provide additional information to the server. One of these headers is the `Accept-Language` header that allows indicating the preferred language of the client [#flang]_. For example, `curl -HAccept-Language:en http://www.google.be` will send to `http://www.google.be` a HTTP request indicating English (`en`) as the preferred language. Does google provides a different page in French (`fr`) and Walloon (`wa`) ? Same question for `http://www.uclouvain.be` (given the size of the homepage, use ``diff`` to compare the different pages retrieved from `www.uclouvain.be`).
10 ../../exercises/http.rst:29
English
Compare the size of the http://www.yahoo.com and http://www.google.com web pages by downloading them with curl_.
11 ../../exercises/http.rst:31
English
The `ipvfoo <https://code.google.com/p/ipvfoo/>`_ extension on google chrome allows the user to visually detect whether a website is using IPv6 and IPv4, but also to see which web sites have been contacted when rendering a given web page. Some websites are distributed over several dozens of different servers. Can you find one ?
12 ../../exercises/http.rst:33
English
Some websites are reachable over both IPv4 and IPv6 while others are only reachable over IPv4 [#fv6only]_. You can use the `-6` (resp. `-4`) option to force curl_ to only use IPv6 (resp. IPv4). Verify that `www.computer-networking.info` is reachable over IPv6 and IPv4 and then check whether your university website already supports IPv6.
13 ../../exercises/http.rst:35
English
curl_ supports a huge number of options and parameters that are described in its `man page <https://curl.haxx.se/docs/manpage.html>`_ Some of them allow you to force the utilization of a specific version of HTTP. These include `--http0.9`, `--http1.0`, `--http1.1` and `--http2`. Using the latter, verify whether your favorite website supports HTTP/2.0.
14 ../../exercises/http.rst:37
English
As for the DNS, besides using software tools that implement the HTTP protocols, it can also be useful to analyze packet traces with wireshark_ . The exercises below contain simple packet traces collected with different versions of the HTTP protocol.
15 ../../exercises/http.rst:50
English
Footnotes
16 ../../exercises/http.rst:51
English
The minimum command sent to a HTTP server is `GET / HTTP/1.0` followed by CRLF and a blank line.
17 ../../exercises/http.rst:53
English
This syllabus is now hosted on a web server using HTTPS (port 443) instead of HTTP (port 80).
18 ../../exercises/http.rst:55
English
The list of available language tags can be found at http://www.iana.org/assignments/language-subtag-registry. Versions in other formats are available at http://www.langtag.net/registries.html. Additional information about the support of multiple languages in Internet protocols may be found in rfc5646_.
19 ../../exercises/http.rst:57
English
There are probably very few websites that only support IPv6 and not IPv4. If you find one, let us know by submitting a pull-request to change this exercise.
The translation has come to an end.