HTTP & Friends Flashcards

1
Q

What is the main issue with FTP

A

FTP is outdated, lacks security, and uses multiple connections for control and data transfer, which complicates setups. It also doesn’t encrypt data, making it vulnerable to attacks.

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

Why was FTP originally designed

A

FTP was designed to standardize file transfers between systems with different file structures and character sets. It solved issues with inconsistent and incompatible transfer methods before a universal protocol existed.

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

What is one advantage of FTP

A

FTP decouples path names, allowing clients to access files without knowing the server’s exact file system layout. This flexibility makes it easier to adapt to different environments and manage files across various systems.

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

How many connections does FTP require at a minimum

A

FTP requires a minimum of three connections: one for the control channel to send commands, and two for data transfer (one for uploading and one for downloading). This setup ensures commands and data are managed separately, but it increases complexity compared to protocols that use a single connection.

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

What is the key difference between FTP and HTTP

A

FTP requires multiple connections while HTTP uses a single connection

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

What does the HTTP HEAD method do

A

It retrieves metadata without downloading the entire file

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

Why is caching used in HTTP

A

To serve static content faster and reduce server load

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

What does the Accept flag in HTTP specify

A

The Accept flag in HTTP specifies the content types (e.g., text/html, application/json) that the client can process. This helps the server deliver responses in a format the client supports.

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

What is the purpose of the Content-Length header

A

The Content-Length header specifies the size of the response body in bytes. This helps the client know when the response ends, ensuring proper parsing of the content.

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

What is HSTS and why is it important

A

HSTS (HTTP Strict Transport Security) enforces the use of HTTPS by ensuring all connections to a website are encrypted. It protects users from downgrade attacks and prevents unencrypted connections, improving security against man-in-the-middle attacks.

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

Why should JSON and POST be used for remote services

A

To avoid security issues like length extension attacks.
POST allows securely sending data in the request body, and JSON provides a structured format resistant to injection vulnerabilities.

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

What is the primary role of an HTTP User-Agent

A

To identify the client software making the request.
This helps the server customise responses based on the client’s capabilities or requirements.

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

What is the purpose of the ETag header

A

The ETag header uniquely identifies a resource on the server and checks if it has been modified.
It helps optimise caching by allowing clients to determine whether they need to download the resource again.

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

What is the difference between GET and POST in HTTP

A

GET retrieves data while POST sends data to the server

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

What is HTTP Basic Auth

A

An insecure method of sending credentials encoded in Base64

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

Why should HTTPS be used instead of HTTP

A

To encrypt data and ensure secure communication

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

What does the Accept-Encoding header indicate

A

The compression formats the client can handle

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

Why is Accept-Ranges useful

A

It allows downloading specific parts of a file

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

What is the main benefit of keep-alive connections

A

They enable multiple requests over a single connection improving performance

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

What is the significance of HTTP status codes

A

They indicate the result of an HTTP request

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

What are the categories of HTTP status codes

A

1xx informational 2xx success 3xx redirection 4xx client error 5xx server error

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

What is the main issue with HTTP Basic Auth

A

It sends credentials insecurely without encryption

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

Why are cookies considered a security risk

A

They can be abused to store sensitive client-side data

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

What is the purpose of the Set-Cookie header

A

To store a key-value pair for future requests to the same domain

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

Why is caching on inbound servers useful

A

Improves response times, reduces backend load, scales better for high traffic, and avoids redundant processing of identical requests.

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

What is the function of proxy_pass in HTTP servers

A

To route requests to a specified backend server

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

What is the purpose of the Host header in HTTP

A

It allows multiple virtual servers to share the same IP address by distinguishing incoming requests based on the Host value

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

Why should cookies only store a session ID

A

To avoid exposing sensitive information client-side

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

What is the purpose of Content-Type in HTTP

A

To inform the client how to handle the response content

30
Q

Why should HTTPS always be used when using cookies

A

To prevent them from being intercepted or altered by plain text attacks

31
Q

What is HTTP POST used for

A

To send data to the server typically for updates or changes

32
Q

Why is using GET for sensitive data discouraged

A

GET exposes parameters in URLs and logs

33
Q

What is the role of Accept-Language in HTTP

A

To specify the client’s preferred language for the response

34
Q

Why should compressed files be stored directly on the server

A

To save I/O CPU and network resources

35
Q

What is the main issue with legacy FTP implementations

A

They require complex connections and are not firewall-friendly

36
Q

What is the role of NAT helpers in FTP

A

To modify payloads and set up inbound NAT mappings

37
Q

What is the Accept-Charset header used for

A

To indicate the preferred character sets for the response

38
Q

What is the purpose of HTTP DELETE

A

To remove a specified resource on the server

39
Q

What does the Strict-Transport-Security header enforce

A

It ensures only HTTPS connections are allowed for a domain

40
Q

What is the purpose of a proxy cache in HTTP

A

To improve performance by storing frequently accessed content

41
Q

Why is FTP considered inflexible in modern networks

A

It struggles with NAT firewalls and is simplex

42
Q

What is a common use case for HTTP HEAD

A

Checking if a file has changed without downloading it

43
Q

What is the main difference between HTTP and HTTPS

A

HTTPS encrypts the connection using TLS

44
Q

Why is TLS vital in modern networking

A

It secures data in transit against interception or tampering

45
Q

What is the main limitation of FTP control connections

A

They require manual NAT adjustments and payload modifications

46
Q

What is the purpose of the Last-Modified header

A

To indicate the last time the resource was changed

47
Q

Why is the Universal Firewall Bypass Protocol nickname given to HTTP

A

It is flexible and often used to bypass restrictions

48
Q

What does the Connection header in HTTP control

A

Whether the connection can be reused or should be closed

49
Q

Why should HTTP headers be case-insensitive

A

To ensure compatibility across implementations

50
Q

What is the purpose of HTTP DELETE

A

To remove a resource from the server

51
Q

Why is gzip compression beneficial for HTTP responses

A

It reduces bandwidth usage and improves load times

52
Q

What is the drawback of using cookies for authentication

A

They can be intercepted and reused if not encrypted

53
Q

What does the Content-Encoding header specify

A

The encoding used on the response content

54
Q

What is the difference between HTTP 1.1 and HTTP 2

A

HTTP 2 supports multiple streams and optimisations

55
Q

What is the purpose of caching in HTTP

A

To reduce server load and improve response times

56
Q

Why is Base64 encoding used in HTTP Basic Auth

A

To encode username and password into a single string

57
Q

What is a potential risk of passing arguments via GET

A

They are visible in logs and URLs

58
Q

What is the role of the HTTP Accept header

A

To indicate acceptable media types for the response

59
Q

Why are inbound caches used in enterprises

A

To organise systems and centralise certificate management

60
Q

What is the Accept-Ranges header used for

A

To enable partial downloads by byte range

61
Q

What does the Server header in HTTP reveal

A

The software and version of the web server

62
Q

What is a common security issue with HTTP Basic Auth

A

Credentials are sent unencrypted

63
Q

Why is using HTTPS for all operations recommended

A

To ensure data integrity and prevent eavesdropping

64
Q

What is a key difference between FTP and HTTP paths

A

HTTP paths are flexible and do not depend on file systems

65
Q

What is the significance of HTTP status code 404

A

It indicates the requested resource was not found

66
Q

What does HTTP caching rely on

A

Headers like Last-Modified and ETag for validation

67
Q

What is the purpose of HTTP PUT

A

To upload or replace a resource on the server

68
Q

Why is NAT problematic for FTP connections

A

It requires modifying payloads to match IP addresses

69
Q

What is the function of the Content-Length header

A

To specify the size of the HTTP response body

70
Q

What is the main drawback of legacy FTP modes

A

They are incompatible with modern NAT and firewalls