room ~ HTTP in Detail

HTTP in Detail

Methods, headers, cookies, status codes, curl, and security headers

1/7
lessons

HTTP & HTTPS Fundamentals

What is HTTP?

  • HTTP = HyperText Transfer Protocol
  • Client (browser) aur server ke beech request/response protocol
  • Stateless = har request independent, server pichli request yaad nahi rakhta
  • Sessions maintain karne ke liye cookies use hoti hain

HTTP vs HTTPS

FeatureHTTPHTTPS
Port80443
EncryptedNoYes (TLS)
Data visibleTo anyone on networkOnly client + server
CertificateNot neededSSL/TLS cert required

URL Structure

https://example.com:443/profile?id=6#details

│ │ │ │ │ │

scheme domain port path query fragment

PartExamplePurpose
Schemehttps://Protocol type
Domainexample.comServer address
Port:443Service port (optional if default)
Path/profileResource location
Query?id=6Parameters to server
Fragment#detailsClient-side anchor (not sent to server)

HTTP Message Structure

Start line (method + path OR status code)

Headers (key: value pairs)

(empty line)

Body (optional data)

Pentest Relevance

  • HTTP traffic = visible to intercepting proxy (Burp Suite)
  • HTTPS protects from network sniffing, not from server-side bugs
  • URL parameters (query strings) = potential injection points
  • Always check: is the target using HTTP or HTTPS?