W3C home > Mailing lists > Public > www-lib@w3.org > January to March 2003

HTTPS requires a cache file?

From: Jonathan Oexner <Jonathan.Oexner@Sun.COM>
Date: Thu, 20 Feb 2003 15:37:36 -0500
To: www-lib@w3.org
Message-id: <3E553C90.3050801@Sun.COM>
      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?

#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 */

    /* Close down SSL */

    /* Delete our profile */

    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;





  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");}
Received on Thursday, 20 February 2003 15:37:48 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:55 UTC