Lecture 5 Flashcards

1
Q

HTTP is a stateless protocol. What does this mean?

A

Nothing is remembered between transactions

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

What is the structure of an HTTP message?

A

Initial request/response line

0 or more header lines

Empty line

Optional message body

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

What is the structure of an HTTP request line?

A

<method> <path> <version></version></path></method>

e.g.

GET path/to/file/index.html HTTP/1.0

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

What is the structure of an HTTP repsonse line?

A

<version> <code> <description></description></code></version>

e.g.

HTTP/1.0 200 OK

or HTTP/1.0 404 Not Found

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

A 1xx response code indicates:

A

an informational message

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

A 2xx response code indicates:

A

success of some kind

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

A 3xx response code indicates:

A

redirection to another url

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

A 4xx response code indicates:

A

an error on the client’s part

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

A 5xx response code indicates:

A

an error on the server’s part

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

What is a HEAD request?

A

The same as a GET request but:

only returns response headers not the actual resource

useful to check charactersitics of a resource without actuall d/ling it

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

What is a POST request?

A

Sends data to the server usually for some sort of processing

request URI is not a resource to retrieve but the program to handle the data being sent

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