changing default feature set to include HTTPS and allowing disabling of post processor

This commit is contained in:
Christian Grothoff
2010-08-19 12:37:20 +00:00
parent c04fb9d426
commit cf741b6cbc
4 changed files with 59 additions and 26 deletions
+7 -1
View File
@@ -1,8 +1,14 @@
Thu Aug 19 14:15:01 CEST 2010
Changed code to enable error messages and HTTPS by default;
added option to disable post processor API (use
breaks binary compatibility, should only be done
for embedded systems that require minimal footprint). -CG
Thu Aug 19 13:26:00 CEST 2010
Patches for Windows to ease compilation trouble. -GT/CG
Sat Aug 14 15:43:30 CEST 2010
Fixed small, largely hypothetical leaks.
Fixed small, largely hypothetical leaks.
Reduced calls to strlen for header processing. -CG
Fri Aug 6 12:51:59 CEST 2010
+14 -7
View File
@@ -16,17 +16,24 @@ If you are using Subversion, run "autoreconf -fi" to create configure.
In order to run the testcases, you need a recent version of libcurl.
libcurl is not required if you just want to install the library.
Especially for development, do use the MHD_USE_DEBUG option to get
error messages.
Configure options
=================
Especially for development, use "--enable-messages" to enable error
reporting (and use MHD_USE_DEBUG). Error reporting is not enabled by
default to reduce the size of the library (error messages take
space!). If you are concerned about space, you should set "CFLAGS" to
"-Os -fomit-frame-pointer" to have gcc generate tight code. The
resulting binary should be about 30k (without SSL support) depending
on the platform.
If you are concerned about space, you should set "CFLAGS" to "-Os
-fomit-frame-pointer" to have gcc generate tight code.
You can use the following options to disable certain MHD features:
--disable-https: no HTTPS / TLS / SSL support (significant reduction)
--disable-messages: no error messages (they take space!)
--disable-postprocessor: no MHD_PostProcessor API
The resulting binary should be about 32k depending on the platform.
Portability
+33 -17
View File
@@ -222,17 +222,32 @@ AC_FUNC_FSEEKO
# optional: have error messages ?
AC_MSG_CHECKING(whether to enable error messages)
AC_ARG_ENABLE(messages,
[AS_HELP_STRING([--enable-messages],
[enable MHD error messages])],
[enable_messages=$enableval],
[enable_messages="no"])
AC_MSG_RESULT($enable_messages)
if test "$enable_messages" = "yes"
[AS_HELP_STRING([--disable-messages],
[disable MHD error messages])],
[disable_messages=$enableval],
[disable_messages="no"])
AC_MSG_RESULT($disable_messages)
if test "$disable_messages" = "no"
then
AC_DEFINE([HAVE_MESSAGES],[1],[Include error messages])
fi
# optional: have postprocessor?
AC_MSG_CHECKING(whether to enable postprocessor)
AC_ARG_ENABLE(postprocessor,
[AS_HELP_STRING([--disable-postprocessor],
[disable MHD PostProcessor functionality])],
[disable_postprocessor=$enableval],
[disable_postprocessor="no"])
AC_MSG_RESULT($disable_postprocessor)
if test "$disable_postprocessor" = "no"
then
AC_DEFINE([HAVE_POSTPROCESSOR],[1],[Include postprocessor])
fi
AM_CONDITIONAL([HAVE_POSTPROCESSOR],test x$disable_postprocessor = xno)
# optional: have zzuf, socat?
AC_CHECK_PROG([HAVE_ZZUF],[zzuf], 1, 0)
AC_CHECK_PROG([HAVE_SOCAT],[socat], 1, 0)
@@ -284,11 +299,11 @@ AC_DEFINE_UNQUOTED([HAVE_GNUTLS], $gnutls, [We have gnutls])
# optional: HTTPS support. Enabled by default
AC_MSG_CHECKING(whether to enable HTTPS support)
AC_ARG_ENABLE([https],
[AS_HELP_STRING([--enable-https],
[enable HTTPS support (default is yes)])],
[enable_https=$enableval],
[enable_https="yes"])
if test "$enable_https" = "yes"
[AS_HELP_STRING([--disable-https],
[disable HTTPS support (default is enabled)])],
[disable_https=$enableval],
[disable_https="no"])
if test "$disable_https" = "no"
then
if test "$gcrypt" = "true" -a "$gnutls" = "true"
then
@@ -301,9 +316,9 @@ then
else
AC_DEFINE([HTTPS_SUPPORT],[0],[disable HTTPS support])
fi
AC_MSG_RESULT($enable_https)
AC_MSG_RESULT($disable_https)
AM_CONDITIONAL(ENABLE_HTTPS, test "$enable_https" = "yes")
AM_CONDITIONAL(ENABLE_HTTPS, test "$disable_https" = "no")
MHD_LIB_LDFLAGS="-export-dynamic -no-undefined"
@@ -375,14 +390,15 @@ fi
AC_MSG_NOTICE([Configuration Summary:
Operating System: ${host_os}
Target directory: ${prefix}
Messages: ${enable_messages}
libgcrypt: ${MSG_GCRYPT}
libcurl (testing): ${MSG_CURL}
HTTPS support: ${enable_https}
Target directory: ${prefix}
Messages disabled: ${disable_messages}
Postproc disabled: ${disable_postprocessor}
HTTPS disabled: ${disable_https}
])
if test "$enable_https" = "yes"
if test "$disable_https" = "no"
then
AC_MSG_NOTICE([HTTPS subsystem configuration:
License : LGPL only
+5 -1
View File
@@ -13,13 +13,17 @@ EXTRA_DIST = EXPORT.sym
lib_LTLIBRARIES = \
libmicrohttpd.la
if HAVE_POSTPROCESSOR
SUPPORT_POSTPROCESSOR = postprocessor.c
endif
libmicrohttpd_la_SOURCES = \
connection.c connection.h \
reason_phrase.c reason_phrase.h \
daemon.c \
internal.c internal.h \
memorypool.c memorypool.h \
postprocessor.c \
$(SUPPORT_POSTPROCESSOR) \
response.c response.h
libmicrohttpd_la_LDFLAGS = \
$(MHD_LIB_LDFLAGS) \