Web Science/Part1: Foundations of the web/Hypertext Transfer Protocol/Making HTTP requests/quiz

Da Wikiversità, l'apprendimento libero.
Jump to navigation Jump to search

1 What is the syntax of an HTTP GET request using version 1.0 of HTTP?

GET HTTP/1.0 /path/filename\r\n\r\n
GET /path/filename HTTP/1.0\r\n\r\n
HTTP/1.0 GET /path/filename\r\n\r\n

2 How is the end of the HTTP request marked?

by closing the TCP connection
By an empty line
FINISH
none of the above

3 Which of the following are types of HTTP requests

GET
HELP
HEAD
READ
POST
CREATE
PUT
DELETE
ASK
TRACE
OPTIONS
TRANSFER
CONNECT
PATCH
UPDATE

4 How is the end of a HTTP/1.0 response marked?

by closing the TCP connection
By an empty line
FINISH
none of the above

5 What is meant when we say HTTP is a stateless protocol?

all requests have to be idempotent
it cannot be built on top of a connection oriented protocol which creates a session (like tcp)
no user session is created on the web server
Same HTTP requests will always be handled in the same way independent of the last time's outcome and of the last request.

6 Compare peer to peer protocols with client server protocols

P2P Client / Server
every host can make a request and every host can make a response.
some hosts can make requests and some hosts (potentially the same) can make responses.
everyone is allowed to start a conversation and send data
load on the system can become an essential problem
the more hosts using the protocol the more reliable it becomes.
there is no authority