W3C home > Mailing lists > Public > www-lib@w3.org > October to December 1998

What url for an in-memory buffer?

From: <Jim_Ravan@avid.com>
Date: Mon, 14 Dec 1998 13:53:00 -0500
To: www-lib@w3.org
Message-ID: <852566DA.0067BB28.00@amm02.avid.com>


I'm writing a routine that PUTs a memory buffer using HTTP. It uses
HTPutAbsolute() to do the work. That routine needs an anchor to represent
the memory buffer. The code looks something like:

     // Create an anchor to represent the buffer being written.
     anchor = HTAnchor_findAddress(??????);
     HTAnchor_setDocument(HTAnchor_parent(anchor), bufAddr);
     HTAnchor_setLength(HTAnchor_parent(anchor), bufLen);

     // Perform a ranged PUT on that anchor.
     request = HTRequest_new();
     HTRequest_addRange(request, "bytes", rangeStr);
     HTPutAbsolute(HTAnchor_parent(anchor), urlStr, request);

As you can see, I don't know what URL to use to represent the memory
buffer. HTAnchor_findAddress() will try to parse whatever URL is passed in,
but I have no idea what form the URL should take. Should I just make
something up, for instance "memory://buffer"? The request and the anchor
are short-lived and are deleted at the end of the routine.

regards,
-jim
Received on Monday, 14 December 1998 13:55:19 EST

This archive was generated by hypermail pre-2.1.9 : Wednesday, 3 September 2003 17:59:24 EDT