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

Q: ComLine (w3c), POST (!formdata), HTPostAnchor

From: Andy Zwirko <zwirko@ayce.com>
Date: Wed, 23 Oct 1996 19:16:04 -0400
Message-ID: <326EA734.56A4@ayce.com>
To: www-lib@w3.org
CC: zwirko@ayce.com
Good Day All...

  I'm wondering if anyone has attempted to use the Document ASIS POSTing
feature available throught libwww.  Specifically Im working with the
ComLine (w3c) example code and attempting to perform a File Upload
from one URL to another URL, that is, NOT Formdata.  I have noted that 
the ComLine code is lacking support under the case: METHOD_POST section 
of HTLine.c  So after reading the docs, which seem to say the EXACT same 
thing for EVERY PUT and POST function  :( ... surely there are 
differences? , I added the following line of code to make it look like 
this:

    case METHOD_POST:
        if (formdata) {
            HTParentAnchor * posted = NULL;
            posted = HTPostFormAnchor(formfields, (HTAnchor *) 		
			cl->anchor, cl->request);
            status = posted ? YES : NO;
        } else {
            /* MORE ADDED HERE */
            status  = HTPostAnchor( cl->anchor, (HTAnchor *) cl->dest,
                                    cl->request);
        }
        break;

I run w3c as follows:

 ./w3c -vbptu -post -dest http://ayce/~dwigley/Test1.pl README

and get the following dump:

HTSimplify.. `http://ayce/~dwigley/Test1.pl' into
............ `http://ayce/~dwigley/Test1.pl'
HTSimplify.. 
`file://ayce.ayce.com/home2/zwirko/w3c-libwww-5.0a/ComLine/src/README' 
into............ 
`file://ayce.ayce.com/home2/zwirko/w3c-libwww-5.0a/ComLine/src/README'
Timeout cbf. 0x384 active (req=0x46000, sec=10, usec=0)
You might not be allowed to use this method here, continue? (y/n) y
HTAccess.... Accessing document http://ayce/~dwigley/Test1.pl
Credentials. verified
HTTP........ Looking for `http://ayce/~dwigley/Test1.pl'
HTDoConnect. Looking up `ayce'
Looking up ayce
DNS Add..... `ayce' with 1 home(s) to 0x48e60
ParseInet... as port 80 on 204.176.152.2 with 1 homes
Socket...... Created 3
Socket...... Non-blocking socket
Channel..... Hash value is 3
Channel..... Added 0x476c0 to list 0x40e38
Contacting ayce
UnRegister.. Didn't find entry for socket 3 with ops 10
HTTP........ Dumping request to `w3chttp.out'
Posting Data from callback function
Posting Data No document
Buffer...... ABORTING...
HTTPRequest. ABORTING...
HTTPGen..... ABORTING...
MIMERequest. ABORTING...
UnRegister.. Didn't find entry for socket 3 with ops 3f
Channel..... Semaphore decreased to 0 for channel 0x476c0
Channel..... Delete 0x476c0 with semaphore 0
HTTPStatus.. ABORTING...
Buffer...... ABORTING...
Socket read. FREEING....
Socket write FREEING....
UnRegister.. Didn't find entry for socket 3 with ops 3f
Channel..... Deleted 0x476c0, socket 3
Host info... Nothing pending
HTError..... Generating message
Load End.... Request ended with code -902
HTError..... Generating message
WWWLibTerm.. Cleaning up LIBRARY OF COMMON CODE

Questions:
Is there supposed to be a callback function associated with 
HTPostAnchor that Im required to setup/handle?

How is this different from HTPutDocumentAnchor?

Has anyone successfully used HTPost'Functions'?

Is there some easier way to do what Im trying to do?

Thanks for your time.

andy

p.s. - The -put -dest option seems to work just fine with w3c.
Received on Wednesday, 23 October 1996 19:11:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:27 GMT