Apache2-API
view release on metacpan or search on metacpan
lib/Apache2/API/Status.pm view on Meta::CPAN
See L<rfc7231, section 6.3.3|https://tools.ietf.org/html/rfc7231#section-6.3.3>
This is returned when the web server has accepted the request, without guarantee of successful completion.
Thus, the remote service would typically send an email to inform the user of the status, or maybe provide a link in the header. For example:
POST /some/where HTTP/1.1
Content-Type: application/json
Then the server response:
HTTP/1.1 202 Accepted
Link: </some/status/1234> rel="https://example.org/status"
Content-Length: 0
=head2 HTTP_NON_AUTHORITATIVE (203)
See L<rfc 7231, section 6.3.4|https://tools.ietf.org/html/rfc7231#section-6.3.4>
This would typically be returned by an HTTP proxy after it has made some change to the content.
=head2 HTTP_NO_CONTENT (204)
L<See rfc 7231, section 6.3.5|https://tools.ietf.org/html/rfc7231#section-6.3.5>
This is returned when the request was processed successfully, but there is no body content returned.
=head2 HTTP_RESET_CONTENT (205)
L<See rfc 7231, section 6.3.6|https://tools.ietf.org/html/rfc7231#section-6.3.6>
This is to inform the client the request was successfully processed and the content should be reset, like a web form.
=head2 HTTP_PARTIAL_CONTENT (206)
See L<rfc 7233 on Range Requests|https://tools.ietf.org/html/rfc7233>
This is returned in response to a request for partial content, such as a certain number of bytes from a video. For example:
GET /video.mp4 HTTP/1.1
Range: bytes=1048576-2097152
Then, the server would reply something like:
HTTP/1.1 206 Partial Content
Content-Range: bytes 1048576-2097152/3145728
Content-Type: video/mp4
=head2 HTTP_MULTI_STATUS (207)
See L<rfc 4918 on WebDAV|https://tools.ietf.org/html/rfc4918>
This is returned predominantly under the WebDav protocol, when multiple operations occurred. For example:
HTTP/1.1 207 Multi-Status
Content-Type: application/xml; charset="utf-8"
Content-Length: 637
<d:multistatus xmlns:d="DAV:">
<d:response>
<d:href>/calendars/johndoe/home/132456762153245.ics</d:href>
<d:propstat>
<d:prop>
<d:getetag>"xxxx-xxx"</d:getetag>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/calendars/johndoe/home/fancy-caldav-client-1234253678.ics</d:href>
<d:propstat>
<d:prop>
<d:getetag>"5-12"</d:getetag>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
</d:multistatus>
=head2 HTTP_ALREADY_REPORTED (208)
See L<rfc 5842, section 7.1 on WebDAV bindings|https://tools.ietf.org/html/rfc5842#section-7.1>
This is returned predominantly under the WebDav protocol.
=head2 HTTP_IM_USED (226)
See L<rfc 3229 on Delta encoding|https://tools.ietf.org/html/rfc3229>
C<IM> stands for C<Instance Manipulation>.
This is an HTTP protocol extension used to indicate a diff performed and return only a fraction of the resource. This is especially true when the actual resource is large and it would be a waste of bandwidth to return the entire resource. For example...
GET /foo.html HTTP/1.1
Host: bar.example.net
If-None-Match: "123xyz"
A-IM: vcdiff, diffe, gzip
Then, the server would reply something like:
HTTP/1.1 226 IM Used
ETag: "489uhw"
IM: vcdiff
Date: Tue, 25 Nov 1997 18:30:05 GMT
Cache-Control: no-store, im, max-age=30
See also the L<HTTP range request|https://tools.ietf.org/html/rfc7233> triggering a C<206 Partial Content> response.
=head2 HTTP_MULTIPLE_CHOICES (300)
See L<rfc 7231, section 6.4.1|https://tools.ietf.org/html/rfc7231#section-6.4.1> and L<rfc 5988|https://tools.ietf.org/html/rfc5988> for the C<Link> header.
See L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/300>
This is returned when there is a redirection with multiple choices possible. For example:
HTTP/1.1 300 Multiple Choices
Server: Apache/2.4
Access-Control-Allow-Headers: Content-Type,User-Agent
Access-Control-Allow-Origin: *
Link: </foo> rel="alternate"
Link: </bar> rel="alternate"
Content-Type: text/html
Location: /foo
However, because there is no standard way to have the user choose, this response code is never used.
=head2 HTTP_MOVED_PERMANENTLY (301)
See L<rfc 7231, section 6.4.2|https://tools.ietf.org/html/rfc7231#section-6.4.2>
( run in 0.890 second using v1.01-cache-2.11-cpan-39bf76dae61 )