Appendix G Flashcards

1
Q

How does HTTP work

A

HTTP (Hypertext Transfer Protocol) uses a message based model in which a client sends a request message and the server returns a response message.

The protocol is essentially connectionless although HTTP uses the stageful TCP protocol as its transport mechanism, each exchange of request and response is an autonomous transaction and may use a different TCP connection.

The first line of every HTTP request consists of three items, separated by spaces.

A verb indicating the HTTP method

The requested URL

The HTTP version being used. The only HTTP versions in common use are 1.0 and 1.1 with most browsers using 1.1 by default.

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

What does the GET method do

A

The GET method is designed to retrieve resources. It can be used to send parameters to the requested resource in the URL query string, enabling users to bookmark a URL for a dynamic resource which they can reuse. URLs are displayed on screen and are logged in various places such as browser history and web server access logs. They are also transmitted in the Referer header to other sites when external links are followed. Because of this, the query string should not be used to transmit any sensitive information.

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

What does the POST method do

A

The POST method is designed to perform actions. With this method, request parameters can be sent both in the URL query string and in the body of the message. Although the URL can still be bookmarked, any parameters sent in the message body will be excluded from the bookmark. These parameters will also be excluded from various locations in which ohs of URLS are maintained and from the Referer header. Because POST is designed for performing actions, if a user clicks the browser’s back button to return to a page that was accessed using this method, the browser does not automatically reissue the request and brings the form resubmission notification. Because of this POST requests should always be used when an action is being performed.

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

What does the HEAD method do

A

Functions in the same way as a GET request except that the server should not return a message body in its response. The server should return the same headers that it would have returned to the corresponding GET request. This method can be used to check whether a resource is present before making a GET request for it.

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

What does the TRACE method do

A

Designed for diagnostic purposes. The server should return in the response body the exact contents of the request message it received. This can be used to detect the effect of any proxy servers between the client and server which may manipulate the request.

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

What does the OPTIONS method do

A

Asks the server to report the HTTP methods which are available for a particular resource. The server typically returns a response containing an Allow header that lists the available methods.

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

What does the PUT method do

A

Attempts to upload the specified resource to the server using the content contained in the body of the request. If this method is enabled it could be leveraged to attack the application such as by uploading an arbitrary script and executing it on the server

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

What does the DELETE WebDAV Method do

A

Deletes the specified resource.

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

What does the COPY WebDAV Method do

A

Copies the specified resource to the location given in the Destination header.

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

What does the MOVE WebDAV Method do

A

Moves the specified resource to the location given in the Destination header.

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

What does the SEARCH WebDAV Method do

A

Searches a directory path for resources.

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

What does the PROPFIND WebDAV Method do

A

Retrieves information about the specified resource such as author, size and content type.

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

What does the CONNECT WebDAV Method do

A

A CONNECT request urges your proxy to establish an HTTP tunnel to the remote end-point. Usually is it used for SSL connections, though it can be used with HTTP as well (used for the purposes of proxy-chaining and tunnelling)

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

What do the 1XX status codes mean

A

Informational

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

What do the 2XX status codes mean

A

Request was successful

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

What do the 3XX status codes mean

A

The client is redirected to a different resource

17
Q

What do the 4XX status codes mean

A

The request contains an error of some kind

18
Q

What do the 5XX status codes mean

A

The server encountered an error fulfilling the request

19
Q

What is the status code of a temporarily moved file

A

302 in HTTP 1.0, 307 in HTTP 1.1

20
Q

What is the status code of a permanently moved file

A

301

21
Q

What does the status code 404 mean

A

File not found

22
Q

What does the status code 502 mean

A

Bad Gateway

23
Q

What does the status code 401 mean

A

Unauthorised

24
Q

What does the status code 403 mean

A

Forbidden

25
Q

What does the status code 500 mean

A

Internal server error

26
Q

What does the status code 503 mean

A

Service unavailable

27
Q

Other than something you use when washing your face, what is SOAP

A

Simple Object Access Protocol

SOAP enables applications from one server to communicate with other applications. SOAP is XML and HTTP combined to send and receive messages over the internet.

SOAP uses XML as the message format and HTTP as the message transport.