[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r27152 - in libmicrohttpd: . src/microhttpd
From: |
gnunet |
Subject: |
[GNUnet-SVN] r27152 - in libmicrohttpd: . src/microhttpd |
Date: |
Wed, 15 May 2013 22:04:11 +0200 |
Author: grothoff
Date: 2013-05-15 22:04:11 +0200 (Wed, 15 May 2013)
New Revision: 27152
Modified:
libmicrohttpd/ChangeLog
libmicrohttpd/src/microhttpd/connection.c
Log:
-2nd attempt to fix #2859, this time things look much better
Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog 2013-05-15 13:40:14 UTC (rev 27151)
+++ libmicrohttpd/ChangeLog 2013-05-15 20:04:11 UTC (rev 27152)
@@ -1,4 +1,4 @@
-Mon May 6 12:49:01 CEST 2013
+Mon May 15 12:49:01 CEST 2013
Fixing #2859. -CG
Sun May 5 21:44:08 CEST 2013
Modified: libmicrohttpd/src/microhttpd/connection.c
===================================================================
--- libmicrohttpd/src/microhttpd/connection.c 2013-05-15 13:40:14 UTC (rev
27151)
+++ libmicrohttpd/src/microhttpd/connection.c 2013-05-15 20:04:11 UTC (rev
27152)
@@ -2034,16 +2034,6 @@
pthread_mutex_unlock (&response->mutex);
break;
}
-#if 0
- if (response->data_size == connection->response_write_position -
response->data_start)
- {
- /* nothing to transmit, move on */
- if (response->crc != NULL)
- pthread_mutex_unlock (&response->mutex);
- connection->state = MHD_CONNECTION_BODY_SENT;
- return MHD_YES;
- }
-#endif
ret = connection->send_cls (connection,
&response->data
[connection->response_write_position
@@ -2359,6 +2349,13 @@
case MHD_CONNECTION_NORMAL_BODY_UNREADY:
if (connection->response->crc != NULL)
pthread_mutex_lock (&connection->response->mutex);
+ if (0 == connection->response->total_size)
+ {
+ if (connection->response->crc != NULL)
+ pthread_mutex_unlock (&connection->response->mutex);
+ connection->state = MHD_CONNECTION_BODY_SENT;
+ continue;
+ }
if (MHD_YES == try_ready_normal_body (connection))
{
if (connection->response->crc != NULL)
@@ -2376,6 +2373,13 @@
case MHD_CONNECTION_CHUNKED_BODY_UNREADY:
if (connection->response->crc != NULL)
pthread_mutex_lock (&connection->response->mutex);
+ if (0 == connection->response->total_size)
+ {
+ if (connection->response->crc != NULL)
+ pthread_mutex_unlock (&connection->response->mutex);
+ connection->state = MHD_CONNECTION_BODY_SENT;
+ continue;
+ }
if (MHD_YES == try_ready_chunked_body (connection))
{
if (connection->response->crc != NULL)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r27152 - in libmicrohttpd: . src/microhttpd,
gnunet <=