Reference

HTTP & network inspection

Decode requests, responses, browser rules and network diagnostics.

Scope and conventions

Wire examples use HTTP/1.1 notation; HTTP/2 and HTTP/3 encode it differently. Commands use a Unix-like shell and illustrative example.test hosts. Browser security behavior is labeled separately from HTTP and command-line clients.

Network diagnosis

Inspect name resolution

HTTP & tools

dig queries DNS and prints answers and resolver information. A/AAAA select IP address records; CNAME describes an alias.

Fragment

HTTP & tools · Inspect name resolution
Follow appearance
GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
dig api.example.test A
dig api.example.test AAAA
dig api.example.test CNAME

dig may need installation. DNS lookup success does not establish TCP, TLS or application health.

Read refused, reset and timed-out connections

HTTP & tools

Refused often means an active rejection or no listener. Reset means the connection was abruptly closed. Timeout means the expected event did not arrive in time.

Fragment

HTTP & tools · Read refused, reset and timed-out connections
Follow appearance
GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
DNS -> route -> TCP connection -> TLS -> HTTP response

These are observations, not uniquely identifying root causes. Compare vantage point, address, port and time.

Inspect local listeners with the OS tool

HTTP & tools

Linux ss and macOS lsof can show listening TCP sockets. Bind address matters: loopback-only service differs from one exposed on other interfaces.

Fragment

HTTP & tools · Inspect local listeners with the OS tool
Follow appearance
GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
# Linux:
ss -ltn
# macOS (also available on many Unix systems):
lsof -nP -iTCP -sTCP:LISTEN

Process visibility depends on permissions. Inspect the process; do not stop an unrelated listener.

Inspect addresses and the selected route

HTTP & tools

The local interface/address and chosen next hop help explain whether traffic leaves by the expected path.

Fragment

HTTP & tools · Inspect addresses and the selected route
Follow appearance
GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
# Linux:
ip address
ip route get 192.0.2.10
# macOS:
ifconfig
route -n get 192.0.2.10

192.0.2.10 is a documentation address. Linux iproute2 syntax is not macOS route syntax.

Inspect the TLS handshake and server name

HTTP & tools

TLS authenticates an endpoint using a certificate chain and hostname validation. SNI tells a shared endpoint which server name is requested.

Fragment

HTTP & tools · Inspect the TLS handshake and server name
Follow appearance
GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
openssl s_client -connect api.example.test:443 \
  -servername api.example.test

This is handshake inspection, not a complete application health check. Verification defaults differ by tool/version; curl’s normal certificate validation is preferable for a real HTTPS request.

Separate delay, throughput and loss

HTTP & tools

Latency measures delay; throughput measures achieved transfer rate; loss measures missing packets. ping/traceroute use probes that can be filtered or deprioritized.

Fragment

HTTP & tools · Separate delay, throughput and loss
Follow appearance
GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
ping api.example.test
traceroute api.example.test

A missing traceroute hop does not by itself identify a forwarding failure. ICMP reachability does not prove HTTP readiness.

Compare IPv4 and IPv6 paths

HTTP & tools

-4 restricts curl to IPv4; -6 restricts it to IPv6. A difference can narrow an address-family or route problem, without uniquely identifying its cause.

Fragment

HTTP & tools · Compare IPv4 and IPv6 paths
Follow appearance
GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
curl -4 -I --connect-timeout 3 https://api.example.test/
curl -6 -I --connect-timeout 3 https://api.example.test/

Compare the same hostname, method and network vantage point. A family may have no matching DNS record.

Test an address while retaining hostname semantics

HTTP & tools

--resolve supplies an address for a particular hostname/port pair while keeping that hostname in the URL, Host handling and TLS server-name validation.

Fragment

HTTP & tools · Test an address while retaining hostname semantics
Follow appearance
GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
curl --resolve api.example.test:443:192.0.2.10 \
  --connect-timeout 3 https://api.example.test/health

192.0.2.10 is a documentation address. This tests one selected endpoint, not normal DNS resolution. A proxy can change which resolution path is used.

Separate connection stages using curl timing

HTTP & tools

Timing values such as time_namelookup, time_connect, time_appconnect and time_starttransfer are elapsed from transfer start; they are not independent stage durations.

Fragment

HTTP & tools · Separate connection stages using curl timing
Follow appearance
GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
curl -sS -o /dev/null \
  -w 'dns=%{time_namelookup} tcp=%{time_connect}
tls=%{time_appconnect} first=%{time_starttransfer}
total=%{time_total}\n' \
  https://api.example.test/health

Subtract successive applicable values cautiously. Reused connections, redirects, proxies and multiplexing change interpretation. First-byte time includes more than server compute time.

Make proxy use explicit during diagnosis

HTTP & tools

curl can use proxy environment variables. --proxy selects a proxy; --noproxy controls hosts that bypass it. Use an explicit comparison when your environment permits direct access.

Fragment

HTTP & tools · Make proxy use explicit during diagnosis
Follow appearance
GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
curl -v --proxy http://proxy.example.test:8080 \
  https://api.example.test/
curl -v --noproxy '*' https://api.example.test/

Verbose output can contain credentials. Proxy variable names/case have documented security rules; do not assume every client honors the same variables.

Verify the certificate chain and hostname

HTTP & tools

OpenSSL s_client can inspect a handshake while explicitly checking the hostname and making verification failures fatal. Use the CA store appropriate to your installation.

Fragment

HTTP & tools · Verify the certificate chain and hostname
Follow appearance
GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
openssl s_client -connect api.example.test:443 \
  -servername api.example.test \
  -verify_hostname api.example.test -verify_return_error

# curl validates HTTPS certificates by default:
curl -I https://api.example.test/

SNI selection and hostname verification are separate jobs. Do not substitute -k/--insecure for fixing an unexpected trust/hostname failure.

Recognize packet-size and path-MTU problems

HTTP & tools

MTU limits packet size on a link; path-MTU discovery tries to learn a usable end-to-end size. Small requests succeeding while larger transfers stall can justify a packet-size investigation, but is not a diagnosis by itself.

Fragment

HTTP & tools · Recognize packet-size and path-MTU problems
Follow appearance
GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
Link MTU -> packetization -> tunnel/transport overhead
Observe packet sizes and ICMP/ICMPv6 feedback
Compare the same transfer from another path

Probe tools and fragmentation flags differ by OS. Blocked ICMP, tunnels and transport behavior can obscure the symptom.

Measure jitter and achieved throughput

HTTP & tools

Jitter describes variation in delay, with the statistic/convention stated. Throughput measures delivered data over time; available bandwidth and application throughput are different quantities.

Fragment

HTTP & tools · Measure jitter and achieved throughput
Follow appearance
GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
Record: endpoint + direction + duration + payload size
Compare: median/tail delay, delay variation, loss and bytes/s

A short ping sample cannot establish application throughput or a reliable tail percentile. State the sampling window and measurement method.