Skip to content

Commit cde2cc8

Browse files
author
grothoff
committed
fixing regression from January 6th
git-svn-id: https://gnunet.org/svn/libmicrohttpd@25922 140774ce-b5e7-0310-ab8b-a85725594a96
1 parent bd04c04 commit cde2cc8

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

ChangeLog

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
Sat Jan 26 21:26:48 CET 2013
2+
Fixing regression introduced Jan 6 (test on data_size instead
3+
of total_size. -CG
4+
15
Fri Jan 11 23:21:55 CET 2013
26
Also return MHD_YES from MHD_destroy_post_processor if
37
we did not get '\r\n' in the upload. -CG
48

59
Sun Jan 6 21:10:13 CET 2013
610
Enable use of "MHD_create_response_from_callback" with
7-
body size of zeor. -CG
11+
body size of zero. -CG
812

913
Tue Dec 25 16:16:30 CET 2012
1014
Releasing libmicrohttpd 0.9.24. -CG

src/daemon/connection.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ try_ready_normal_body (struct MHD_Connection *connection)
370370
response = connection->response;
371371
if (NULL == response->crc)
372372
return MHD_YES;
373-
if (0 == response->data_size)
373+
if (0 == response->total_size)
374374
return MHD_YES; /* 0-byte response is always ready */
375375
if ( (response->data_start <=
376376
connection->response_write_position) &&
@@ -479,7 +479,7 @@ try_ready_chunked_body (struct MHD_Connection *connection)
479479
else
480480
{
481481
/* buffer not in range, try to fill it */
482-
if (0 == response->data_size)
482+
if (0 == response->total_size)
483483
ret = 0; /* response must be empty, don't bother calling crc */
484484
else
485485
ret = response->crc (response->crc_cls,
@@ -496,7 +496,7 @@ try_ready_chunked_body (struct MHD_Connection *connection)
496496
return MHD_NO;
497497
}
498498
if ( (MHD_CONTENT_READER_END_OF_STREAM == ret) ||
499-
(0 == response->data_size) )
499+
(0 == response->total_size) )
500500
{
501501
/* end of message, signal other side! */
502502
strcpy (connection->write_buffer, "0\r\n");

src/include/microhttpd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ typedef void
10261026
* POST data.
10271027
*
10281028
* @param cls user-specified closure
1029-
* @param kind type of the value
1029+
* @param kind type of the value, always MHD_POSTDATA_KIND when called from MHD
10301030
* @param key 0-terminated key for the value
10311031
* @param filename name of the uploaded file, NULL if not known
10321032
* @param content_type mime-type of the data, NULL if not known

0 commit comments

Comments
 (0)