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

Re: Making POST (and PUT) requests

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Tue, 23 Jan 1996 18:36:50 -0500
Message-Id: <9601232336.AA05608@www20>
To: Erik Selberg <speed@cs.washington.edu>
Cc: www-lib@w3.org
Erik Selberg writes:
> Didn't need to hack the library... here are some code snippets. I use
> a class "URLClass" which has a bunch of spiffy methods, like
> isPostURL() etc. Looks like the java class, acually. Anyway, here's
> basically how I do a GET/POST.
> I encountered two bugs in the library (4.0) which cause this code NOT
> to work. The first is in streampipe(), which causes the output stream
> of anything but a GET request to be HTBlackHole (i.e. /dev/null!)

This is correct and it has been fixed in the latest version 4.0C

> the
> second being in HTMIME_put_block which causes anything using the
> content_length field (like POST requests) to stop reading after
> you've _read_ content_length bytes (the content_length is used for
> telling the server how many bytes you're writing). I'm assuming Henrik
> will have patches for these in a day or so.

This is a problem as long as you use the same anchor for both data objects. By 
using two anchors - one that represents the form data which you keep in memory 
and one which represents what you get back from the remote server then this is 
not a problem. This is how it works while using PUT or POST from a local file, 
for example and this is how I imagined it to work on memory buffers as well.


Henrik Frystyk Nielsen, <frystyk@w3.org>
World-Wide Web Consortium, MIT/LCS NE43-356
545 Technology Square, Cambridge MA 02139, USA
Received on Tuesday, 23 January 1996 18:37:49 UTC

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