gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r10076 - in libmicrohttpd: doc/chapters doc/examples src/ex


From: gnunet
Subject: [GNUnet-SVN] r10076 - in libmicrohttpd: doc/chapters doc/examples src/examples src/testcurl/https
Date: Wed, 20 Jan 2010 22:07:20 +0100

Author: durner
Date: 2010-01-20 22:07:20 +0100 (Wed, 20 Jan 2010)
New Revision: 10076

Modified:
   libmicrohttpd/doc/chapters/largerpost.inc
   libmicrohttpd/doc/examples/largepost.c
   libmicrohttpd/src/examples/fileserver_example.c
   libmicrohttpd/src/examples/fileserver_example_dirs.c
   libmicrohttpd/src/examples/fileserver_example_external_select.c
   libmicrohttpd/src/examples/https_fileserver_example.c
   libmicrohttpd/src/testcurl/https/tls_authentication_test.c
   libmicrohttpd/src/testcurl/https/tls_test_common.c
Log:
use untranslated file input mode, important on Windows

Modified: libmicrohttpd/doc/chapters/largerpost.inc
===================================================================
--- libmicrohttpd/doc/chapters/largerpost.inc   2010-01-20 21:06:42 UTC (rev 
10075)
+++ libmicrohttpd/doc/chapters/largerpost.inc   2010-01-20 21:07:20 UTC (rev 
10076)
@@ -225,7 +225,7 @@
 @verbatim
   if (!con_info->fp)
     {
-      if (NULL != (fp = fopen (filename, "r")) )
+      if (NULL != (fp = fopen (filename, "rb")) )
         {
           fclose (fp);
           con_info->answerstring = fileexistspage;

Modified: libmicrohttpd/doc/examples/largepost.c
===================================================================
--- libmicrohttpd/doc/examples/largepost.c      2010-01-20 21:06:42 UTC (rev 
10075)
+++ libmicrohttpd/doc/examples/largepost.c      2010-01-20 21:07:20 UTC (rev 
10076)
@@ -80,7 +80,7 @@
 
   if (!con_info->fp)
     {
-      if (NULL != (fp = fopen (filename, "r")))
+      if (NULL != (fp = fopen (filename, "rb")))
         {
           fclose (fp);
           con_info->answerstring = fileexistspage;

Modified: libmicrohttpd/src/examples/fileserver_example.c
===================================================================
--- libmicrohttpd/src/examples/fileserver_example.c     2010-01-20 21:06:42 UTC 
(rev 10075)
+++ libmicrohttpd/src/examples/fileserver_example.c     2010-01-20 21:07:20 UTC 
(rev 10076)
@@ -62,7 +62,7 @@
       return MHD_YES;
     }
   *ptr = NULL;                  /* reset when done */
-  file = fopen (&url[1], "r");
+  file = fopen (&url[1], "rb");
   if (file == NULL)
     {
       response = MHD_create_response_from_data (strlen (PAGE),

Modified: libmicrohttpd/src/examples/fileserver_example_dirs.c
===================================================================
--- libmicrohttpd/src/examples/fileserver_example_dirs.c        2010-01-20 
21:06:42 UTC (rev 10075)
+++ libmicrohttpd/src/examples/fileserver_example_dirs.c        2010-01-20 
21:07:20 UTC (rev 10076)
@@ -55,7 +55,7 @@
   return snprintf (buf, max,
                   "<a href=\"/%s\">%s</a><br>",
                   e->d_name,
-                  e->d_name);  
+                  e->d_name);
 }
 
 
@@ -83,9 +83,9 @@
       return MHD_YES;
     }
   *ptr = NULL;                  /* reset when done */
-  file = fopen (&url[1], "r");
+  file = fopen (&url[1], "rb");
   if (file == NULL)
-    {      
+    {
       response = MHD_create_response_from_callback (MHD_SIZE_UNKNOWN,
                                                    32 * 1024,
                                                    &dir_reader,

Modified: libmicrohttpd/src/examples/fileserver_example_external_select.c
===================================================================
--- libmicrohttpd/src/examples/fileserver_example_external_select.c     
2010-01-20 21:06:42 UTC (rev 10075)
+++ libmicrohttpd/src/examples/fileserver_example_external_select.c     
2010-01-20 21:07:20 UTC (rev 10076)
@@ -62,7 +62,7 @@
       return MHD_YES;
     }
   *ptr = NULL;                  /* reset when done */
-  file = fopen (&url[1], "r");
+  file = fopen (&url[1], "rb");
   if (file == NULL)
     {
       response = MHD_create_response_from_data (strlen (PAGE),

Modified: libmicrohttpd/src/examples/https_fileserver_example.c
===================================================================
--- libmicrohttpd/src/examples/https_fileserver_example.c       2010-01-20 
21:06:42 UTC (rev 10075)
+++ libmicrohttpd/src/examples/https_fileserver_example.c       2010-01-20 
21:07:20 UTC (rev 10076)
@@ -131,7 +131,7 @@
     }
   *ptr = NULL;                  /* reset when done */
 
-  file = fopen (&url[1], "r");
+  file = fopen (url, "rb");
   if (file == NULL)
     {
       response = MHD_create_response_from_data (strlen (EMPTY_PAGE),
@@ -142,7 +142,7 @@
     }
   else
     {
-      stat (&url[1], &buf);
+      stat (url, &buf);
       response = MHD_create_response_from_callback (buf.st_size, 32 * 1024,    
 /* 32k PAGE_NOT_FOUND size */
                                                     &file_reader, file,
                                                     
(MHD_ContentReaderFreeCallback)

Modified: libmicrohttpd/src/testcurl/https/tls_authentication_test.c
===================================================================
--- libmicrohttpd/src/testcurl/https/tls_authentication_test.c  2010-01-20 
21:06:42 UTC (rev 10075)
+++ libmicrohttpd/src/testcurl/https/tls_authentication_test.c  2010-01-20 
21:07:20 UTC (rev 10076)
@@ -174,7 +174,7 @@
 {
   FILE *cert_fd;
 
-  if (NULL == (cert_fd = fopen (ca_cert_file_name, "w+")))
+  if (NULL == (cert_fd = fopen (ca_cert_file_name, "wb+")))
     {
       fprintf (stderr, "Error: failed to open `%s': %s\n",
                ca_cert_file_name, strerror (errno));

Modified: libmicrohttpd/src/testcurl/https/tls_test_common.c
===================================================================
--- libmicrohttpd/src/testcurl/https/tls_test_common.c  2010-01-20 21:06:42 UTC 
(rev 10075)
+++ libmicrohttpd/src/testcurl/https/tls_test_common.c  2010-01-20 21:07:20 UTC 
(rev 10076)
@@ -87,7 +87,7 @@
     }
   *ptr = NULL;                  /* reset when done */
 
-  file = fopen (url, "r");
+  file = fopen (url, "rb");
   if (file == NULL)
     {
       response = MHD_create_response_from_data (strlen (PAGE_NOT_FOUND),
@@ -290,7 +290,7 @@
 {
   FILE *test_fd;
 
-  if (NULL == (test_fd = fopen (TEST_FILE_NAME, "w+")))
+  if (NULL == (test_fd = fopen (TEST_FILE_NAME, "wb+")))
     {
       fprintf (stderr, "Error: failed to open `%s': %s\n",
                TEST_FILE_NAME, strerror (errno));





reply via email to

[Prev in Thread] Current Thread [Next in Thread]