Skip to content

Latest commit

 

History

History

web-applications

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Web Applications

Language

The goal of these programming exercises is to practise:

  • working with a web server
  • working with a web client
  • creating simple HTML pages

🌐 HTTP

Exercise 1

Analyse the following HTTP request:

    GET /martignon/index.html HTTP/1.1
    Host: cs.unibg.it
    User Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/124
    (KHTML, like Gecko) Safari/125
    Accept: ext/xml, application/xml, application/xhtml+xml, text/html;q=0.9,
    text/plain;q=0.8, image/png,*,*;q=0.5
    Accept-Language: it
    Keep-Alive: 300
    Connection: keep-alive
  1. What is the requested URL?
  2. Which version of HTTP is used?
  3. Does the browser ask for a persistent or a non-persistent connection?
  4. What is, in your opinion, the utility in indicating the type (and version) of browser used by the client in the HTTP Request?

Exercise 2

An HTTP client sends the following message:

    GET http://cs.unibg.it /index.html HTTP/1.1
    User-agent: Mozilla/4.0
    Accept: text/html, image/gif, image/jpeg
    If-modified-since: 27 Feb 2017 08:10:00

Write down two feasible responses of the HTTP server (only the status line)

🕸️ HTML

An HTML Form is a section of the document that collects input from the user. The input from the user is generally sent to a server (Web servers, Mail clients, etc). We use the HTML <form> element to create forms in HTML.

Read this documentation, and create a HTML form that looks like the following:

HTML Form