Visual RFC.
ALL RFCs / RFC 2397
Read the RFC ↗
RFC 2397 / INLINE DATA URLS

Bound size and check interpretation policy

05

Short inline data is useful, but valid decoding neither grants permission to interpret a type nor guarantees an application can handle its size.

RFC 2397 · § 6EXAMPLE
3 / 3
Bound size and check interpretation policyThree local-policy decisions. A short data comma Hi URL fits a fictional32-character limit and permitted text/plain type. A separate longer URL is rejected by its measured character count before decoding or allocation of carried data. Another short URL marks text/html, which this configured application disallows, so it stops before interpretation despite easy decoding. These limits and messages are chosen policy, not universal RFC limits or a safety certification; the RFC warns about small-value utility, media-type risk and screening only external retrieval.Example policy: 32 URL charactersAllowed marked type: text/plaindata:text/html,HiURL length: 17interpret text/htmlDisallowed marked media typeDecoding does not grant permission
03
Reject a disallowed marked type.

A separate short data:text/html,Hi URL is within the budget but its marked text/html type is disallowed. Stop before interpretation, even though Hi is easy to decode.

Source for this drawing: RFC 2397 · Read RFC section 6 ↗

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A request starts a conversation.

A client asks for a resource. A server sends a response. The method, address, headers, and status explain what that conversation means.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

KEY POINT

Decodeable is not authorized or harmless.

  • RFC2397 describes short values and warns about applications with length limits or fixed buffers. Its HTML2.0 SGML limits are historical examples, not universal limits for modern browsers.
  • An application should not interpret a data URL whose marked media type is disallowed by its configuration. The security considerations of the media type still apply.
  • Inline active content can evade policies that only screen external retrieval through a firewall proxy. Applications need suitable controls for carried content as well; encoding does not remove its risks.
DETAILS

The worked policy allows only text/plain and chooses a maximum URL length of 32 characters. Those values and the rejection messages are local example policy, not RFC mandates. The guide is not a browser origin, navigation, CSP, MIME sniffing or sandbox specification. No actual HTML/script/image interpretation, external request or trust decision is performed. Size checks precede decoding in the teaching gate.

Read the RFC section ↗

All chapters in RFC 2397

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗