commit de029f6250ccae1ffdb25915135906c84428e34c
parent 9d92a4827f713787f16d548191f80075c7475b4f
Author: Christian Grothoff <christian@grothoff.org>
Date: Fri, 14 Aug 2015 12:19:43 +0000
export MHD_get_reason_phrase_for
Diffstat:
8 files changed, 17 insertions(+), 44 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,6 @@
+Fri Aug 14 14:13:55 CEST 2015
+ Export MHD_get_reason_phrase_for() symbol. -CG
+
Sat Aug 8 12:19:47 CEST 2015
Added checks for overflows and buffer overruns, fixed
possible buffer overrun.
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
@@ -130,7 +130,7 @@ typedef intptr_t ssize_t;
* Current version of the library.
* 0x01093001 = 1.9.30-1.
*/
-#define MHD_VERSION 0x00094208
+#define MHD_VERSION 0x00094209
/**
* MHD-internal return code for "YES".
@@ -341,6 +341,16 @@ _MHD_DEPR_MACRO("Macro MHD_LONG_LONG_PRINTF is deprecated, use MHD_UNSIGNED_LONG
/** @} */ /* end of group httpcode */
/**
+ * Returns the string reason phrase for a response code.
+ *
+ * If we don't have a string for a status code, we give the first
+ * message in that status code class.
+ */
+const char *
+MHD_get_reason_phrase_for (unsigned int code);
+
+
+/**
* Flag to be or-ed with MHD_HTTP status code for
* SHOUTcast. This will cause the response to begin
* with the SHOUTcast "ICY" line instad of "HTTP".
diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am
@@ -58,7 +58,7 @@ endif
libmicrohttpd_la_SOURCES = \
connection.c connection.h \
- reason_phrase.c reason_phrase.h \
+ reason_phrase.c \
daemon.c \
internal.c internal.h \
memorypool.c memorypool.h \
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
@@ -30,7 +30,6 @@
#include "connection.h"
#include "memorypool.h"
#include "response.h"
-#include "reason_phrase.h"
#if HAVE_NETINET_TCP_H
/* for TCP_CORK */
diff --git a/src/microhttpd/connection_https.c b/src/microhttpd/connection_https.c
@@ -30,7 +30,6 @@
#include "connection.h"
#include "memorypool.h"
#include "response.h"
-#include "reason_phrase.h"
#include <gnutls/gnutls.h>
diff --git a/src/microhttpd/reason_phrase.c b/src/microhttpd/reason_phrase.c
@@ -17,7 +17,6 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
/**
* @file reason_phrase.c
* @brief Tables of the string response phrases
@@ -25,7 +24,7 @@
* @author Christian Grothoff (minor code clean up)
*/
#include "platform.h"
-#include "reason_phrase.h"
+#include "microhttpd.h"
#ifndef NULL
#define NULL (void*)0
diff --git a/src/microhttpd/reason_phrase.h b/src/microhttpd/reason_phrase.h
@@ -1,37 +0,0 @@
-/*
- This file is part of libmicrohttpd
- Copyright (C) 2007 Lymba
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-/**
- * @file reason_phrase.c
- * @brief Tables of the string response phrases
- * @author Elliot Glaysher
- */
-
-#ifndef REASON_PHRASE_H
-#define REASON_PHRASE_H
-
-/**
- * Returns the string reason phrase for a response code.
- *
- * If we don't have a string for a status code, we give the first
- * message in that status code class.
- */
-const char *MHD_get_reason_phrase_for (unsigned int code);
-
-#endif
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
@@ -432,7 +432,7 @@ MHD_create_response_from_fd_at_offset64 (uint64_t size,
if ((int64_t)size < 0 || (int64_t)offset < 0 || (int64_t)(size + offset) < 0)
return NULL;
- response = MHD_create_response_from_callback(size,
+ response = MHD_create_response_from_callback (size,
4 * 1024,
&file_reader,
NULL,