[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r11715 - libmicrohttpd/src/examples
From: |
gnunet |
Subject: |
[GNUnet-SVN] r11715 - libmicrohttpd/src/examples |
Date: |
Sun, 13 Jun 2010 11:14:50 +0200 |
Author: grothoff
Date: 2010-06-13 11:14:50 +0200 (Sun, 13 Jun 2010)
New Revision: 11715
Modified:
libmicrohttpd/src/examples/fileserver_example_external_select.c
Log:
more
Modified: libmicrohttpd/src/examples/fileserver_example_external_select.c
===================================================================
--- libmicrohttpd/src/examples/fileserver_example_external_select.c
2010-06-13 09:08:24 UTC (rev 11714)
+++ libmicrohttpd/src/examples/fileserver_example_external_select.c
2010-06-13 09:14:50 UTC (rev 11715)
@@ -69,7 +69,11 @@
return MHD_YES;
}
*ptr = NULL; /* reset when done */
- file = fopen (&url[1], "rb");
+ if ( (0 == stat (&url[1], &buf)) &&
+ (S_ISREG (buf.st_mode)) )
+ file = fopen (&url[1], "rb");
+ else
+ file = NULL;
if (file == NULL)
{
response = MHD_create_response_from_data (strlen (PAGE),
@@ -80,7 +84,6 @@
}
else
{
- stat (&url[1], &buf);
response = MHD_create_response_from_callback (buf.st_size, 32 * 1024,
/* 32k page size */
&file_reader,
file,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r11715 - libmicrohttpd/src/examples,
gnunet <=