Web Architecture Flashcards

1
Q

Which layers do these fall into?

FTP, UDP, IP, Ethernet, TCP, SMTP

A
FTP - Application
UDP - Transport
IP - Network
TCP - Transport
Ethernet - Network Interface
SMTP - Application
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What must HTTP provide?

A
  • A subset of the file transfer functionality
  • The ability to request an index search
  • Automatic format negotiation
  • The ability to refer the client to another server
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

4 properties of HTTP:

A
  • HTTP is an application-level protocol
  • HTTP is a request-response protocol
  • HTTP is a synchronous protocol
  • HTTP is a stateless protocol
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

URL and URI

A

URL - Used to uniquely identify a resource over the web
URI - String of characters that unambiguously identifies a particular resource
URL is a subset of URI

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

What is in a HTTP request

A
  • Request Line
  • Header
  • Empty line
  • Message Body
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Main http methods?

A

GET Get resource from the server
POST Used to post the data up to the Web server
HEAD Get the header that a GET request would have obtained
PUT Ask the server to store the data
DELETE Ask the server to delete the data

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

3 properties of a http request line?

A
  • Request Method
  • Resource
  • Protocol Version
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What did the HTTP updates add?

A
HTTP 0.9
• Only GET method
HTTP 1.0
• Adds HEAD and POST
• Separate connection to the same server is made for every resource request
HTTP 1.1
• Adds OPTIONS, PUT, DELETE, TRACE, and CONNECT
• Can reuse a connection multiple times!
HTTP 2.0
• Allows the server to "push" content.
• respond with data for more queries than the client requested
HTTP 3.0
• Faster Connection time
• Runs over UDP
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a HTTP header?

A

Colon-separated key-value pairs

Terminated by a carriage return (CR) and line feed (LF) character sequence

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

What are the HTTP request headers?

A
Host
Accept
Content-Type
Cookie
User-Agent
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does a HTTP header empty line mean?

A

Must consist of only

Must not contain other whitespace

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

What does a HTTP request message body contain?

A
  • Optional

* Useful for post and put

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

What are the HTTP response parts?

A
  • Status Line
  • Header
  • Empty line
  • Message Body
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a response status line?

A

Contains:
• Version
• Status Code

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

What are the categories of HTTP status codes

A
1xx informational response
2xx successful
3xx redirection
4xx client error
5xx server error
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Examples of HTTP response headers?

A
Age
Date
Server
Last-Modified
Content-Length
Content-Type
17
Q

What is the HTTP response message body?

A
  • Contains the actual data

* May be HTML but also other data

18
Q

Summarise HTTP

A

1) User issues URL from a browser
2) Browser sends a request message
3) Server maps URL to a file or program under the document directory
4) Server returns a response message
5) Browser formats the response and displays