W3C home > Mailing lists > Public > www-html@w3.org > August 1998

Problems with PUT requests

From: olga <olga@goliath.eai.com>
Date: Mon, 24 Aug 1998 17:04:22 -0500 (CDT)
Message-ID: <XFMail.980824170422.olga@eai.com>
To: www-html@w3.org

I am trying to write a wrapper class MyWWWLib which uses 3wc.
I have the function "putURL" which processes HTTP PUT requests.

The problem is that in the client code like following:

        MyWWWLib lib;
        lib.putURL(src, dest);
        lib.putURL(src, dest);


or like: 

        MyWWWLib lib;
        lib.getURL(src, dest);  //GET request
        lib.putURL(src, dest);


the first putURL (or getURL) request is processed correctly and then the
programs hangs... (even though multiple get requests are processed w/o any

I suspect that the problem is in the callback function(?), but I do not know how
to write it correctly.

I would appreciate any help on this matter.

Thank you,

        Olga Antropova.
------------------------------ There is my current callback function:

PRIVATE HTChunk * result = NULL;

PRIVATE int terminate_handler (HTRequest * request, HTResponse * response,
                               void * param, int status) 
    if (status == HT_LOADED && result && HTChunk_data(result)) {
        fprintf(stderr, HTChunk_data(result));


    return HT_OK;
-------------------------------- and part of the PUT function:

BOOL MyWWWLib::putURL(const char* url, const char* local_filename)  

        HTRequest *request;
        request = HTRequest_new();
        BOOL status = NO;

        HTProfile_newNoCacheClient(APP_NAME, APP_VERSION);

        HTNet_addAfter(terminate_handler, NULL, NULL, HT_ALL, HT_FILTER_LAST); 
        HTParentAnchor * destination;    // Destination for PUT, etc. 
        HTParentAnchor * source = NULL;  // The file we want to put 
        char * cwd = HTGetCurrentDirectoryURL();
        char * ref = HTParse(local_filename, cwd, PARSE_ALL);
        source = (HTParentAnchor *) HTAnchor_findAddress(ref);
        char * dest = HTParse(url, cwd, PARSE_ALL);
        destination = (HTParentAnchor *) HTAnchor_findAddress(dest);
        status = HTPutDocumentAnchor( source, (HTAnchor *) destination, request
        return status;

E-Mail: olga <olga@eai.com>
Date: 24-Aug-98

This message was sent by XFMail
Received on Monday, 24 August 1998 18:01:28 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:48 UTC