HTTPS requires a cache file?

Jonathan Oexner <[email protected]>
Newsgroups gmane.comp.lib.libwww
Message-ID <[email protected]>
Hi,
      I'm kinda new to the libwww, so bear with me.  I'm trying to write a simple HTTP/HTTPS client that takes a URL, does a GET and spits the output to the screen using the HTLoadToChunk function.  For some reason, an HTTPS URL causes the function to prompt the user for a file to print to, and never returns.  A plain ol' HTTP URL works as planned.  Any ideas what I need to do to fix this?
Thanks,
-Jon
configUtility.c (text/plain, 1.2 KB)
#include <stdio.h>
#include "WWWLib.h"
#include "WWWHTTP.h"
#include "WWWInit.h"
#include "WWWSSL.h"


int terminate_handler (HTRequest *request, HTResponse *response,
    		       void *param, int status){
    /* Delete our request again */
    HTRequest_delete(request);

    /* Close down SSL */
    HTSSLhttps_terminate();

    /* Delete our profile */
    HTProfile_delete();

    exit(status ? status : 0);
}


PRIVATE int printer (const char * fmt, va_list pArgs)
{
    return (vfprintf(stdout, fmt, pArgs));
}

PRIVATE int tracer (const char * fmt, va_list pArgs)
{
    return (vfprintf(stderr, fmt, pArgs));
}

int main(int argc, char **argv) {

  HTRequest *request=NULL;
  HTChunk *chunk = NULL;
  char *url=argv[1];
  char *cwd = NULL;
  char *absolute_url = NULL;

  HTPrint_setCallback(printer);
  HTTrace_setCallback(tracer);

  HTSSL_protMethod_set(HTSSL_V23);

  HTSSL_verifyDepth_set(2);

  HTSSLhttps_init(YES);

  HTProfile_newNoCacheClient("configUtility", "1.0");

  HTNet_addAfter(terminate_handler, NULL, NULL, HT_ALL, HT_FILTER_LAST);

  request = HTRequest_new();

  printf("url = %s\n",url);

  chunk = HTLoadToChunk(url, request);

  if(chunk) {printf("Yay, chunk ain't null!\n"); }
  else {printf("Boo, chunk is null.\n");}
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.