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

Help: Libww.a Ver. 4.0pre7 - Why doesn't it work?

From: Vu Nguyen <vu@isdnsys.com>
Date: Thu, 14 Dec 1995 09:21:14 -0500
Message-Id: <01BACA05.852D5DA0@vun.isdnsys.com>
To: "'www-lib@w3.org'" <www-lib@w3.org>

Except for my mod, the below code is taken out of the example from W3C/Library sect.???

According to the Lib Guide, it should:

"When this program is run, it will take the argument and call the Library to fetch it. As we haven't given any name for
the file which we are creating on our local disk, the Library will prompt the user for a file name. Automatic
redirection and access authentication is handled by the HTTP module but might require the user to type in a user
name and a password..."

*************************** sample code *******************************
#include "WWWLib.h"
#include "HTTP.h"

int main (int argc, char ** argv)

    HTList *converters = HTList_new();
    HTRequest *request = HTRequest_new();         /* Create a request
object */

    WWWTRACE |= SHOW_ALL_TRACE;	/*my mod here	*/

    HTLibInit("TestApp", "1.0");
    HTProtocol_add("http", YES, HTLoadHTTP, NULL);
    HTConversion_add(converters, "*/*", "www/present", HTSaveLocally,
1.0, 0.0, 0.0);
    if (argc == 2) {
        HTLoadAbsolute(argv[1], request);
    } else
        printf("Type the URL to fetch\n");
    HTRequest_delete(request);                  /* Delete the request
object */

********************* end of code ***********************

when I tried to execute "myapp", 
I got the following:

**********************TTY dump ************************************
Call Add.... HTNetCallback 8053370
TimeZone.... GMT + (-5) hours (including DST)
Tmp Root.... Root set to `/tmp/'
HTSimplify.. `' into
............ `'
Find Parent. 8072d30 with hash 39 and address `
artup.html' created
HTAccess.... Accessing document
HTNet New... Using default address
HTNet_new... starting request 8071ee8 (retry=1)
HTTP........ Looking for `'
Access Auth. composing authorization for
Access Auth. `hypertext/WWW/Library/User/Using/Startup.html' (so probably not protected)
HTTP........ Not sending authorization (yet)
HTDoConnect. Looking up `'
ParseInet... as port 80 on with 1 homes
HTDoConnect. Created socket 3
HTDoConnect. Blocking socket
HTAlert find.. opcode 2
HTDoConnect. Connect failed
UnRegister.. SockOps 63
UnRegister.. Didn't find entry for socket 3
Error Add... number:  44        Severity: 1     Parameter: `connect: Connection timed out'      Wher
e: `connect'
HTNetDelete. Object and call callback functions
HTNet_delete Remove net object 8072e38
Net callback 8053370 (request=8071ee8, status=-1)
HTAlert find.. opcode 256
Load End.... ERROR: Can't access `'
AnchorDelete Remove parent 8072d30 and children

********** end of TTY Dump **************

Notice that there are some TTYPrint's that are mine, I added them to help me see what is going on (:

Some of my questions:

	1.  why didn't it find entry for socket 3?
	2.  should my using "" cause any problem parsing the URL?
	3.  I don't have the Yellow Page set up on the Unix machine, could it be a pottential problem?


vu nguyen

Received on Wednesday, 13 December 1995 09:20:03 GMT

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