Re: Total length?

>>Jim_Ravan@avid.com wrote:
>>
>> How do I discover the total length of a URL? That is, given that my
users
>> will call me to read/write pieces of documents, I need to know how big
the
>> original document is, so I can tell when they're asking me to read/write
>> past the end.

>All metadata known about a resource is stored in the HTAnchor object.
>
>    http://www.w3.org/Library/src/HTAnchor.html
>
>The application can query the Anchor object for all the metainformation
using
>the HTAnchor methods. For example, the length is
>
>    HTAnchor_length(...)

True, but I don't need the length of the current GET. I need the *total*
length
of the entire document. My layer is only responsible for getting a small
piece
of a *much* larger document each time it is called. There would be no way
that I could read in these documents; they are all gigabytes in size. But I
do
need to know the total length of a document, because the HTTP/1.1 spec
requires servers to ignore reange requests that are invalid. I assume that
to mean "If they are malformed, or if they do not map to the available
range."
In fact, my current testing shows this to be true. When I issue a range
request
that requests past the end of a document, I get the beginning. The range
request is ignored.

I guess another way of fixing this problem would be to find a way to know
when
the server had ignored my range request. If there is no way to know the
*total* length of a URL, is there a way to know when a range request is
ignored?

regards,
-jim

Received on Wednesday, 16 December 1998 14:38:08 UTC