Kolam Ayer MakersLinux Foundations

HTTP

Core Idea

HTTP is a request-response protocol: a client asks for a resource, and a server returns a status line, headers, and usually a body.

Commands To Try

curl -I https://lf2607.kolamayermakers.org/~username/
curl -L https://lf2607.kolamayermakers.org/~username/
curl -v https://lf2607.kolamayermakers.org/~username/

curl -I shows headers. Plain curl shows the body. curl -v shows the client-server conversation.

Response Shape

HTTP/2 200
server: Caddy
content-type: text/html; charset=utf-8

<html>...</html>

Status Codes To Know

Code Meaning
200 OK. The resource was returned.
301 or 302 Redirect. Try curl -L.
404 Not found. The server could not find that path.
500 Server error. The server failed while handling the request.
502 Bad gateway. A proxy could not reach or use its backend.

Methods

This course mostly uses GET and header-only inspection. curl -I sends a HEAD request, which asks for headers without the body.

HTTP Versus HTTPS

HTTP is the protocol. HTTPS is HTTP carried inside TLS encryption. HTTPS protects the request and response in transit and lets the client verify the server certificate.

Common Failures

Proof Check

Fetch your static site with curl -I. Identify the status code, server header, and content type.

Docs Pointers