HTTP message decoder

Paste a raw HTTP/1.1 request or response and read it decoded: the request line or status line against the IANA registries, every field filed under the part of the specification that defines it, the framing decision RFC 9112 makes for the body (which of its eight rules applies, Content-Length against the bytes present, Transfer-Encoding overriding it, the chunks decoded one by one with their trailers), and the credentials and cookies the message carries, surfaced and masked. The decode-only half of an interception proxy's inspector: it never sends, replays or tampers.

Web & HTTP
Try

A response. No findings on the points the decoder checks.

17 lines, 3 field lines, line endings CRLF, 83 octets of body.

The status line

Version
HTTP/1.1
Status code
200 2xx successful the registry calls it OK (RFC9110)
Reason phrase
OK

How the body is framed (RFC 9112, Section 6.3)

Rule 4: a Transfer-Encoding field is present. With chunked as the final coding, the body ends where the chunks say; in a response with another final coding, it ends when the server closes; in a request, a server answers 400.

Body ends by
the chunked coding
Content-Length
absent
Transfer-Encoding
chunked
Body pasted
83 octets (UTF-8)
3 chunks
#linesizeextensionsdata (first 80 characters)
164 = 4·Wiki
285 = 5·pedia
310E = 14· in\r\n\r\nchunks.

The last-chunk (size 0) is present. Decoded content: 23 octets. Trailer fields: Expires: Wed, 21 Oct 2015 07:28:00 GMT.

Wikipedia in\r\n\r\nchunks.

3 fields, by what they are for

Framing (RFC 9112)
  • Transfer-Encoding: chunked line 3 RFC 9112, Section 6.1: HTTP Semantics
Message metadata (RFC 9110, Section 6)
  • Trailer: Expires line 4 RFC 9110, Section 6.6.2: HTTP Semantics
Representation and content (RFC 9110, Section 8)
  • Content-Type: text/plain line 2 RFC 9110, Section 8.3: HTTP Semantics

Continue with

The message, lines marked

HTTP/1.1 200 OK
Content-Type: text/plain
Transfer-Encoding: chunked
Trailer: Expires
 
4
Wiki
5
pedia
E
in
 
chunks.
0
Expires: Wed, 21 Oct 2015 07:28:00 GMT
 

The decoder reads the message as text and never sends it. Octet counts are UTF-8 counts of the pasted text, so a body with binary content or a different charset measures differently on the wire. The scheme of a request's URL is not in an HTTP/1.1 message (http is assumed), and whether a response answers a HEAD request cannot be known from the response alone. Field values are shown as written; only credentials and cookies are masked. Facts come from RFC 9112, RFC 9110, RFC 9111, the IANA registries, rfc6265bis-22, RFC 7617 and RFC 6648, cited under Sources.

API endpointGEThttps://ronutz.com/api/v1/http-message-decoderDocumented, not served. Opens the specification.

Referenzen