libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 78e52ce15e270006d813e4cdfa6c57a90950c28e
parent adf73d54566059d99812e477b12b8b643517532d
Author: Nils Durner <durner@gnunet.org>
Date:   Sun, 17 Jan 2010 22:15:23 +0000

don't use the first slash for paths

Diffstat:
Msrc/examples/https_fileserver_example.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/examples/https_fileserver_example.c b/src/examples/https_fileserver_example.c @@ -131,7 +131,7 @@ http_ahc (void *cls, } *ptr = NULL; /* reset when done */ - file = fopen (url, "r"); + file = fopen (&url[1], "r"); if (file == NULL) { response = MHD_create_response_from_data (strlen (EMPTY_PAGE), @@ -142,7 +142,7 @@ http_ahc (void *cls, } else { - stat (url, &buf); + stat (&url[1], &buf); response = MHD_create_response_from_callback (buf.st_size, 32 * 1024, /* 32k PAGE_NOT_FOUND size */ &file_reader, file, (MHD_ContentReaderFreeCallback)