{
int i, j, k; /* Looping vars */
http_t *http; /* HTTP connection */
+ http_encryption_t encrypt; /* Encryption type */
http_status_t status; /* Status of GET command */
int failures; /* Number of test failures */
char buffer[8192]; /* Input buffer */
hostname, sizeof(hostname), &port,
resource, sizeof(resource));
- http = httpConnectEncrypt(hostname, port, HTTP_ENCRYPT_IF_REQUESTED);
+ if (!strcasecmp(scheme, "https") || !strcasecmp(scheme, "ipps") ||
+ port == 443)
+ encrypt = HTTP_ENCRYPT_ALWAYS;
+ else
+ encrypt = HTTP_ENCRYPT_IF_REQUESTED;
+
+ http = httpConnectEncrypt(hostname, port, encrypt);
if (http == NULL)
{
perror(hostname);
else
printf("GET failed with status %d...\n", status);
-
start = time(NULL);
length = httpGetLength2(http);
total = 0;