[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r7359 - libmicrohttpd/src/examples
From: |
gnunet |
Subject: |
[GNUnet-SVN] r7359 - libmicrohttpd/src/examples |
Date: |
Sat, 28 Jun 2008 17:00:58 -0600 (MDT) |
Author: grothoff
Date: 2008-06-28 17:00:58 -0600 (Sat, 28 Jun 2008)
New Revision: 7359
Modified:
libmicrohttpd/src/examples/https_server_example.c
Log:
fixing some bugs
Modified: libmicrohttpd/src/examples/https_server_example.c
===================================================================
--- libmicrohttpd/src/examples/https_server_example.c 2008-06-28 16:43:12 UTC
(rev 7358)
+++ libmicrohttpd/src/examples/https_server_example.c 2008-06-28 23:00:58 UTC
(rev 7359)
@@ -211,7 +211,6 @@
const char *version, unsigned int *upload_data_size, void **ptr)
{
static int aptr;
- static char full_url[MAX_URL_LEN];
struct MHD_Response *response;
int ret;
FILE *file;
@@ -227,12 +226,7 @@
}
*ptr = NULL; /* reset when done */
- /* assemble full url */
- strcpy (full_url, connection->daemon->doc_root);
- strncat (full_url, url,
- MAX_URL_LEN - strlen (connection->daemon->doc_root) - 1);
-
- file = fopen (full_url, "r");
+ file = fopen (url, "r");
if (file == NULL)
{
response = MHD_create_response_from_data (strlen (PAGE_NOT_FOUND),
@@ -263,10 +257,10 @@
struct MHD_Daemon *TLS_daemon;
/* look for HTTPS arguments */
- if (argc < 5)
+ if (argc < 6)
{
printf
- ("Usage : %s HTTP-PORT SECONDS-TO-RUN HTTPS-PORT X.509_FILE_PATH\n",
+ ("Usage : %s HTTP-PORT SECONDS-TO-RUN HTTPS-PORT KEY-FILE CERT-FILE\n",
argv[0]);
return 1;
}
@@ -276,7 +270,7 @@
HTTP_daemon =
MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG,
- atoi (argv[1]), NULL, NULL, &http_ahc, MHD_OPTION_END);
+ atoi (argv[1]), NULL, NULL, &http_ahc, NULL,
MHD_OPTION_END);
if (HTTP_daemon == NULL)
{
@@ -290,7 +284,7 @@
NULL, &https_ahc,
NULL, MHD_OPTION_CONNECTION_TIMEOUT, 256,
MHD_OPTION_HTTPS_KEY_PATH, argv[4],
- MHD_OPTION_HTTPS_CERT_PATH, argv[4],
+ MHD_OPTION_HTTPS_CERT_PATH, argv[5],
MHD_OPTION_END);
if (TLS_daemon == NULL)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r7359 - libmicrohttpd/src/examples,
gnunet <=