Skip to content

226 IM Used

Description

The 226 IM Used status code indicates that the server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance. This status code is defined in RFC 3229 (Delta encoding in HTTP) as part of the HTTP Delta encoding mechanism.

The primary purpose of this status code is to support efficient content delivery by allowing clients to request only the differences (deltas) between the version they already have and the current version on the server. This can significantly reduce bandwidth usage when transferring updated versions of resources.

When a server responds with a 226 IM Used status, it's indicating that it has applied one or more instance manipulations (as specified by the client's request headers) to generate a more efficient response than sending the entire resource.

Syntax

The server responds with a 226 IM Used status and includes the manipulated content:

HTTP/1.1 226 IM Used
Content-Type: [appropriate media type]
Content-Length: [length in bytes]
IM: [instance manipulation(s) applied]
ETag: [entity tag of the resulting entity]
Date: [current date and time]

[Response body containing the result of instance manipulation(s)]

Examples

Delta Encoding Example

A client requests an updated version of a resource it already has:

Client Request:

GET /documents/spec.html HTTP/1.1
Host: docs.example.com
If-None-Match: "123456"
A-IM: diffe, gzip

Server Response:

HTTP/1.1 226 IM Used
Content-Type: application/vnd.diffe
Content-Length: 4328
IM: diffe
ETag: "789012"
Date: Thu, 15 Jun 2023 14:30:22 GMT

[Binary delta data that can be applied to the client's version to get the current version]

Range-Based Instance Manipulation Example

A client requests a resource with a specific instance manipulation:

Client Request:

GET /images/large-photo.jpg HTTP/1.1
Host: media.example.org
If-Range: "abcdef"
Range: bytes=0-1023
A-IM: vcdiff

Server Response:

HTTP/1.1 226 IM Used
Content-Type: application/vnd.vcdiff
Content-Length: 652
IM: vcdiff
ETag: "ghijkl"
Date: Thu, 15 Jun 2023 15:45:12 GMT

[Compressed differential data for the requested range]

Multiple Instance Manipulations Example

A client requests a resource with multiple instance manipulations:

Client Request:

GET /api/data.json HTTP/1.1
Host: api.example.com
If-None-Match: "xyz123"
A-IM: vcdiff, gzip

Server Response:

HTTP/1.1 226 IM Used
Content-Type: application/vnd.vcdiff
Content-Encoding: gzip
Content-Length: 1245
IM: vcdiff, gzip
ETag: "abc456"
Date: Thu, 15 Jun 2023 16:30:45 GMT

[Compressed differential data]

Summary

The 226 IM Used status code is a specialized response used in HTTP delta encoding scenarios to optimize bandwidth usage. By allowing servers to send only the differences between versions of a resource, it enables more efficient content delivery, particularly for frequently updated resources or in bandwidth-constrained environments. While not as commonly used as other HTTP status codes, it provides valuable optimization capabilities for systems that implement delta encoding and other instance manipulation techniques.