Handling Redirects; Using Range Headers - Dell DX6000 Application Manual

Dx object storage application guide version 5.0
Table of Contents

Advertisement

Most of these client libraries will take care of the low-level protocol issues for you. Formatting the
requests and interpreting the responses are usually much easier with an existing framework. In fact,
much of the SCSP discussion above can be skipped, allowing the framework to do the work for you.

3.5. Handling Redirects

Some HTTP client libraries and frameworks do not handle redirects correctly for WRITE requests,
at least not by default. Older versions of the HTTP protocol, namely HTTP/1.0, were lax in their
specification of exactly what the client must do when it receives a 301 or a 307 response code.
Because of this, older clients, including many web browsers, developed their own conventions.
While some of these conventions might be useful, they are in direct violation of the HTTP/1.1
specification and therefore incompatible with DX Storage.
Both the Microsoft .NET framework and the libCURL framework (and probably others) are known to
process a redirect from a POST request by changing the POST to a GET and then sending the new
request to the redirect server. Workarounds exist in the impacted frameworks because the behavior
is known to be in violation of the specification. To quote
"When automatically redirecting a POST request after receiving a 301 status code, some existing
HTTP/1.0 user agents will erroneously change it into a GET request."

3.6. Using Range Headers

In some cases, an application might be interested in only a byte portion of a larger object stored in
DX Storage. Rather than read the entire object and filter out the interesting parts, the application
can include one or more Range headers with an SCSP READ request. A READ request can include
more than one Range header. Consult the
Range headers. Here are some examples and their interpretations:
Range: 0-499
Range: 500-999
Range: -500
Range: 0-499, 500-999 Return the first 1000 bytes
Note
Range headers are not compatible with integrity seals because an integrity seal is a hash
of the object's entire contents. If the Range is not set to a value greater than or equal
to the size of the object, the connection is closed as if the integrity seal was invalid. For
more information about integrity seals, see
READ requests that include invalid Range headers (for example, ranges that do not exist in the
object) cause DX Storage to respond with a 416 Range not satisfiable error. A successful response
to a READ that includes one or more Range headers is 206 Partial content. Of course, only data in
the requested ranges are included in the 206 response.
READ requests that include a range like Range: 0-199, 300-349, 500-999 returns a
Content-Type: multipart/byteranges response consisting of three parts: 200, 50, and 500
bytes of content.
For more information, see
byteranges)
in the
Copyright © 2010 Caringo, Inc.
All rights reserved
Return the first 500 bytes of the object
Return the second 500 bytes
Return the last 500 bytes
section 14.35 (Range)
HTTP/1.1
RFC.
RFC
2616:
HTTP/1.1 specification
for a thorough discussion of
Section 20.1, "Integrity
and
appendix 19.2 (Internet Media Type multipart/
13
Seals".
Version 5.0
December 2010

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dx6004sDx6012sDx object storage

Table of Contents