[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r8312 - in libmicrohttpd: . src/daemon src/include
From: |
gnunet |
Subject: |
[GNUnet-SVN] r8312 - in libmicrohttpd: . src/daemon src/include |
Date: |
Mon, 2 Mar 2009 23:53:03 -0700 |
Author: grothoff
Date: 2009-03-02 23:53:03 -0700 (Mon, 02 Mar 2009)
New Revision: 8312
Modified:
libmicrohttpd/AUTHORS
libmicrohttpd/ChangeLog
libmicrohttpd/src/daemon/connection.c
libmicrohttpd/src/include/microhttpd.h
Log:
64-bit and unknown response size fix
Modified: libmicrohttpd/AUTHORS
===================================================================
--- libmicrohttpd/AUTHORS 2009-03-03 06:36:07 UTC (rev 8311)
+++ libmicrohttpd/AUTHORS 2009-03-03 06:53:03 UTC (rev 8312)
@@ -16,6 +16,7 @@
RuXu W <address@hidden>
Matthew Moore
Colin Caughie <address@hidden>
+David Carvalho <address@hidden>
Documentation contributions also came from:
Marco Maggi <address@hidden>
Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog 2009-03-03 06:36:07 UTC (rev 8311)
+++ libmicrohttpd/ChangeLog 2009-03-03 06:53:03 UTC (rev 8312)
@@ -1,3 +1,8 @@
+Mon Mar 2 23:44:08 MST 2009
+ Fixd problem with 64-bit upload and download sizes and
+ "-1" being used to indicate "unknown" by introducing
+ new 64-bit constant "MHD_SIZE_UNKNOWN". -CG/DC
+
Wed Feb 18 08:13:56 MST 2009
Added missing #include for build on arm-linux-uclibc. -CG/CC
Modified: libmicrohttpd/src/daemon/connection.c
===================================================================
--- libmicrohttpd/src/daemon/connection.c 2009-03-03 06:36:07 UTC (rev
8311)
+++ libmicrohttpd/src/daemon/connection.c 2009-03-03 06:53:03 UTC (rev
8312)
@@ -241,7 +241,7 @@
have already sent the full message body */
connection->response_write_position = response->total_size;
}
- if ((response->total_size == -1) &&
+ if ((response->total_size == MHD_SIZE_UNKNOWN) &&
(0 == strcasecmp (connection->version, MHD_HTTP_VERSION_1_1)))
connection->have_chunked_response = MHD_YES;
else
@@ -443,7 +443,7 @@
char buf[128];
connection->have_chunked_upload = MHD_NO;
- if (connection->response->total_size == -1)
+ if (connection->response->total_size == MHD_SIZE_UNKNOWN)
{
have = MHD_get_response_header (connection->response,
MHD_HTTP_HEADER_CONNECTION);
@@ -1110,7 +1110,7 @@
{
instant_retry = MHD_NO;
if ((connection->have_chunked_upload == MHD_YES) &&
- (connection->remaining_upload_size == -1))
+ (connection->remaining_upload_size == MHD_SIZE_UNKNOWN))
{
if ((connection->current_chunk_offset ==
connection->current_chunk_size)
@@ -1242,7 +1242,7 @@
/* dh left "processed" bytes in buffer for next time... */
buffer_head += used;
available -= used;
- if (connection->remaining_upload_size != -1)
+ if (connection->remaining_upload_size != MHD_SIZE_UNKNOWN)
connection->remaining_upload_size -= used;
}
while (instant_retry == MHD_YES);
@@ -1516,7 +1516,7 @@
}
else
{
- connection->remaining_upload_size = -1; /* unknown size */
+ connection->remaining_upload_size = MHD_SIZE_UNKNOWN;
if (0 ==
strcasecmp (MHD_lookup_connection_value
(connection, MHD_HEADER_KIND,
@@ -1887,7 +1887,7 @@
continue;
}
if ((connection->remaining_upload_size == 0) ||
- ((connection->remaining_upload_size == -1) &&
+ ((connection->remaining_upload_size == MHD_SIZE_UNKNOWN) &&
(connection->read_buffer_offset == 0) &&
(MHD_YES == connection->read_closed)))
{
Modified: libmicrohttpd/src/include/microhttpd.h
===================================================================
--- libmicrohttpd/src/include/microhttpd.h 2009-03-03 06:36:07 UTC (rev
8311)
+++ libmicrohttpd/src/include/microhttpd.h 2009-03-03 06:53:03 UTC (rev
8312)
@@ -81,7 +81,7 @@
/**
* Current version of the library.
*/
-#define MHD_VERSION 0x00040001
+#define MHD_VERSION 0x00040002
/**
* MHD-internal return codes.
@@ -91,6 +91,11 @@
#define MHD_NO 0
/**
+ * Constant used to indicate unknown size.
+ */
+#define MHD_SIZE_UNKNOWN ((uint64_t) -1LL)
+
+/**
* HTTP response codes.
*/
#define MHD_HTTP_CONTINUE 100
@@ -959,7 +964,7 @@
* Create a response object. The response object can be extended with
* header information and then be used any number of times.
*
- * @param size size of the data portion of the response, -1 for unknown
+ * @param size size of the data portion of the response, MHD_SIZE_UNKNOW for
unknown
* @param block_size preferred block size for querying crc (advisory only,
* MHD may still call crc using smaller chunks); this
* is essentially the buffer size used for IO, clients
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r8312 - in libmicrohttpd: . src/daemon src/include,
gnunet <=