Application Layer Flashcards

1
Q

Application Level Protocols may be divided into:

A

client-server protocols;

peer-to-protocols

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does a client-server protocol do?

A

In a client-server protocol, a client sends a request to a

server and receives a response back from it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

how does a Hypertext Transfer Protocol (HTTP) work?

A

a client sends a request for a web page to a server and receives the page as a response back from it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

An HTTP request consists of:

A

∙ the request line;
∙ the request headers;
∙ the request body.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The request line consists of:

A

a method, resource, and a version.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Some of the most important methods are:

A
GET receive data
HEAD receive headers of data
POST send additional data
PUT send replacement data
DELETE delete data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The request headers consist of :

A

(name, value) pairs on
separate lines:
Content-Length : 324

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Some of the most important request headers are:

A
Host domain name of the server
Cache-Control caching allowed
Connection connection preferred
Content-Length length of the body
Cookie cookie data
Date date sent
User-Agent name of the client
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Why might a client add the header DNT (short for Do Not Track)?

A

for privacy reasons

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

When is the request body not empty?

A

The request body is empty for all but POST requests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

An HTTP Response consists of:

A

∙ the status line;
∙ the response headers;
∙ the response body.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The status line consists of:

A

a version, code and a reason

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Some of the most important codes and reasons are:

A

200 OK
301 Moved Permanently
404 Not Found
500 Internal Server Error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Some of the most important response headers are:

A
Header Meaning
Cache-Control caching allowed
Connection connection preferred
Content-Length length of the body
Server name of the server 
Set-Cookie cookie data
Transfer-Encoding content-encoding used
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The response body is often in what programming language?

A

HTML

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Why might a server add the header expires (with a date)?

A

A server might add the header expires (with a date) to prevent the client from keeping the response forever
EX. logging content that is updated (weather news competitions)

17
Q

How does a peer to peer protocol work?

A

In a peer-to-peer protocol, one peer sends a request to

another, and receives a response back from it.