Web Architecture Flashcards Preview

Web Development > Web Architecture > Flashcards

Flashcards in Web Architecture Deck (18)
Loading 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
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
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
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

5
Q

What is in a HTTP request

A
  • Request Line
  • Header
  • Empty line
  • Message Body
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

7
Q

3 properties of a http request line?

A
  • Request Method
  • Resource
  • Protocol Version
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
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

10
Q

What are the HTTP request headers?

A
Host
Accept
Content-Type
Cookie
User-Agent
11
Q

What does a HTTP header empty line mean?

A

Must consist of only

Must not contain other whitespace

12
Q

What does a HTTP request message body contain?

A
  • Optional

* Useful for post and put

13
Q

What are the HTTP response parts?

A
  • Status Line
  • Header
  • Empty line
  • Message Body
14
Q

What is a response status line?

A

Contains:
• Version
• Status Code

15
Q

What are the categories of HTTP status codes

A
1xx informational response
2xx successful
3xx redirection
4xx client error
5xx server error
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