W3C home > Mailing lists > Public > www-lib@w3.org > July to September 1999

Re:Change to libwww-ssl\HTSSLReader.c for review

From: oleg oksjuk <oksyuk@hotmail.com>
Date: Sun, 26 Sep 1999 15:30:38 -0400 (EDT)
Message-ID: <19990926192927.20037.qmail@hotmail.com>
To: www-lib-request@w3.org
Has anyone tried to make tow requests, one after another, using SSL library?

The first GET over SSL (to an HTTP 1.1 server) would
work fine but on attempting a second I couldn't get any data.

Here is a simple program. It perfoms two GET requests over SSL. The first 
reguests returns some data from the server, but the second don't.



#include "WWWLib.h"
#include "WWWInit.h"
#include "WWWSSL.h"

/*  Get the WWW Source of uri and return it. If the source hasn't been 
retrieved return NULL */
PRIVATE char * getSource(char * uri)
{
	char * string = NULL;
	HTChunk * chunk = NULL;
	HTRequest * request = HTRequest_new();
	HTRequest_setOutputFormat(request, WWW_SOURCE);
	chunk = HTLoadToChunk(uri, request);
	if (chunk)
	    string = HTChunk_toCString(chunk);
	/* We are done with this request */
	HTRequest_delete(request);
	return string;
}

int main()
{
    HTProfile_newPreemptiveClient("Libwww",  "1.0");
	HTSSLhttps_init(YES);
	printf("String = %s\n", 
getSource("https://lc1.law5.hotmail.passport.com/cgi-bin/dologin?rdrct=http%3a%2f%2flw2fd%2ehotmail%2emsn%2ecom%2fcgi%2dbin%2fHoTMaiL%3fdisk%3d216%2e32%2e180%2e65_d747%26login%3doksyuk%26f%3d1024%26curmbox%3dACTIVE%26_lang%3d%26t%3d2AAAAAAAADgWQHsL%21f4g4JYYiL7XK%2134PxOsUp5DK0P0rmiBhrIiZooA%24%24%26p%3d2AAAAAAAAGOFGM%21kwmWSwLSz7qaWyhMqqyDTvfKzH1Y8i5%215uNSd4iRniOTPdH3GD%21u08Dhw95fx46bmxY2oIeGtMkCMDpoA6rDBdFdssdSVBfR6PqfD5qz2SYLrfzllRs&disk=216.32.180.65_d747&login=oksyuk&f=1024&curmbox=&_lang=&id=2&tw=-10000"));
	printf("String = %s\n", 
getSource("https://lc1.law5.hotmail.passport.com/cgi-bin/dologin?rdrct=http%3a%2f%2flw2fd%2ehotmail%2emsn%2ecom%2fcgi%2dbin%2fHoTMaiL%3fdisk%3d216%2e32%2e180%2e65_d747%26login%3doksyuk%26f%3d1024%26curmbox%3dACTIVE%26_lang%3d%26t%3d2AAAAAAAADgWQHsL%21f4g4JYYiL7XK%2134PxOsUp5DK0P0rmiBhrIiZooA%24%24%26p%3d2AAAAAAAAGOFGM%21kwmWSwLSz7qaWyhMqqyDTvfKzH1Y8i5%215uNSd4iRniOTPdH3GD%21u08Dhw95fx46bmxY2oIeGtMkCMDpoA6rDBdFdssdSVBfR6PqfD5qz2SYLrfzllRs&disk=216.32.180.65_d747&login=oksyuk&f=1024&curmbox=&_lang=&id=2&tw=-10000"));
	HTSSLhttps_terminate();
}

I tried different requests. When the both requests to the server like 
https://, the second  don't return anything. But when one of them to the 
server like http://, they  both return some data.

Is anyone has any idea?

Thanks,
Oleg

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
Received on Monday, 27 September 1999 12:20:02 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:17 UTC