W3C home > Mailing lists > Public > www-lib@w3.org > January to March 1999

Re: Posting from memory?

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Sun, 10 Jan 1999 21:21:08 -0500
To: www-lib@w3.org
Message-ID: <36996014.7490CBA2@w3.org>
To: olga <olga@goliath.eai.com>

olga wrote:
> I am posting the document ASIS. The function requires that the document should
> be in memory. What does it mean? I have seen that the document is of type (void
> *). Could it be a file read stream? Should I somehow indicate what type of
> document I am using by setting appropriate input format?
> Now I am using the character array (as in examples). My problem is that the
> documents are huge and system often cannot allocate the required amount of
> memory to load the complete file.
> So  the question is: Can I use file (or file reader stream) for posting document
> ASIS? If I can then how to setup this usage (format?). If it is not possible
> then how to get around the problem?

No, you can't use a file pointer. There is in fact no functions in the
current HTAccess API that covers what you want. An old version had
something like it - it took a URI as source and a URI as destination and
created a direct pipe between the two streams.

In general this turned out to be too hard - there are too many reasons
for the destination to not immediately accept the data (redirection,
authentication, etc.) and have the source stream pending on this with
the potential od recovering a timed out connection was just too much.

Therefore, the somewhat more wasteful but also more reliable solution of
first getting the source into memory and then do the PUT or POST from

It is possible to take advantage of the fact that local file systems
often are more reliable and hence this particular case can be optimized.
I won't have time for a week or so before I can get around to do that,

Received on Sunday, 10 January 1999 21:21:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:48 UTC