Help with HTLoadAbsolute...

I'm building a GUI-less client using the newPreemptiveClient.  The
client needs to talk SSL.  I have code that works if I use HTLoadToFile
to fetch the URL but that breaks if I use HTLoadAbsolute instead.  Given
that HTLoadToFile ends up calling HTLoadAbsolute, I'm a bit confused.

What HTLoadAbsolute seems to be doing is reading one chunk and then
quitting.  (I'm talking to a 1.1 server over SSL)  Does anyone have any
suggestions as to where I should be looking for the problem?  I have a
sneaking suspicion it has to do with the stream stack that's setup but
since I really don't know what's going on that may be a red herring.

As usual, I have to say that I still haven't developed enough of a
mental model of the mechanics to really understand things.

For what it's worth, here's the bulk of the code.  It's a modified
version of the code in the secureget example.  I'm calling it from a
GUI-based windows app for now.

{
    int		        status = 0;	
    char *              getme = NULL;
    HTRequest *         request = NULL;

    /* Initiate W3C Reference Library with a client profile */
    HTProfile_newPreemptiveClient( "Secure_Client", "1.0" );

    /* And the traces... */
    HTSetTraceMessageMask("sloap");

    /* Register SSL stuff for handling ssl access */
    HTSSLhttps_init(YES);

    /* Need our own trace and print functions */
    HTPrint_setCallback(printer);
    HTTrace_setCallback(tracer);

    /* Set the timeout for long we are going to wait for a response */
    HTHost_setEventTimeout(10000);

    getme = "https://<some URL requiring SSL>";

    request = HTRequest_new();

    /* Start the load */
    status = HTLoadAbsolute (getme, request);           // This doesn't
work
//  status = HTLoadToFile(getme, request, "get.out");   // This works

    HTRequest_delete(request);

    /* Close down SSL */
    HTSSLhttps_terminate();

    /* Delete our profile */
    HTProfile_delete();

    return 0;
}


Thanks again for any help on this.

Marco

Received on Wednesday, 7 July 1999 22:25:59 UTC