---
title: "Short note: HTTP"
subject: "Internet and Intranet"
chapter: 4
key: "semester_8/internet_and_intranet:note-http"
source: https://www.bctengineer.com/q/semester_8/internet_and_intranet/note-http
site: BCT Engineering
---

# Short note: HTTP

Internet and Intranet · Chapter 4: HTTP and the Web Services

- Asked in: 2074 Bhadra, 4 marks; 2073 Bhadra, 4 marks (asked 2 times)
- Video: [Web and HTTP protocol tutorial | Hypertext Transfer Protocol explained | World Wide Web | TechTerms](https://www.youtube.com/watch?v=qcALGDn0zpk) — TechTerms
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/internet_and_intranet/note-http
- Whole chapter: https://www.bctengineer.com/md/semester_8/internet_and_intranet/chapter-4

## Question

Write a short note on HTTP.

## Short answer

HTTP is an application-layer protocol for the Web, using TCP port 80 for request-response between client and server. It is stateless, supports persistent connections, uses methods like GET/POST, and returns status codes (e.g., 200 OK, 404 Not Found) with MIME-typed content.

## Answer

**HTTP (HyperText Transfer Protocol)** is the application layer protocol of the World Wide Web. It defines how browsers (clients) request web objects and how web servers respond. HTTP/1.0 is RFC 1945, HTTP/1.1 is RFC 2616 (updated by RFC 7230-7235), and HTTP/2 is RFC 7540.

**Key features**

- Uses **TCP**, default port **80** (HTTPS uses TLS, port 443).
- **Request/response** model: client sends a request, server returns a response.
- **Stateless:** the server keeps no record of past requests; cookies are used to add state.
- Supports **persistent** (keep-alive) and non-persistent connections.
- Works with any content type (text, image, video) identified by MIME types.

**Messages**

- Request: request line (`GET /index.html HTTP/1.1`), headers, blank line, body.
- Response: status line (`HTTP/1.1 200 OK`), headers, blank line, body.

**Methods:** GET, POST, HEAD, PUT, DELETE, OPTIONS, TRACE, CONNECT.

**Status codes**

| Code | Meaning |
|---|---|
| 200 | OK |
| 301 | Moved permanently |
| 304 | Not modified |
| 400 | Bad request |
| 404 | Not found |
| 500 | Server error |

Related ideas: web caching with conditional GET, cookies, proxies and HTTPS for security.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which is correct about HTTP?
   A. It uses UDP port 53
   B. It uses TCP port 80 (HTTPS 443) with a request/response model
   C. It is stateful
   D. It sends only text
   Answer: B. HTTP is an application layer request/response protocol over TCP, default port 80, and works with any content type. (Key point: HTTP basics)

2. How is state added to stateless HTTP?
   A. Using cookies
   B. Using DHCP
   C. Using POST
   D. Using HEAD
   Answer: A. The server keeps no record of past requests, so cookies are used to add state. (Key point: Stateless nature)

3. What do codes 304 and 404 mean?
   A. 304 Not found; 404 Not modified
   B. 304 Not modified; 404 Not found
   C. 304 Moved permanently; 404 Server error
   D. 304 OK; 404 Bad request
   Answer: B. 304 means Not Modified (cached copy valid) and 404 means Not Found. (Key point: Status codes)
