libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 77ffe1508f26dcd84ecbe4c628eafe0fca7894a9
parent 5f57331ea1756c3aa50dfa69ce1425dcf6684537
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue,  3 Nov 2015 22:42:06 +0000

-add patch from Eugenio Perez

Diffstat:
MChangeLog | 4+++-
Msrc/microhttpd/connection.c | 6+++++-
2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,7 +1,9 @@ Tue Nov 3 23:24:52 CET 2015 Undoing change from Sun Oct 25 15:29:23 CET 2015 as the original code was counter-intuitive but - correct, and the new code does break pipelining. -CG + correct, and the new code does break pipelining. + Ignore empty lines at the beginning of an HTTP + request (more tolerant implementation). -CG Releasing libmicrohttpd 0.9.45. -CG Sat Oct 31 15:52:52 CET 2015 diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -2227,7 +2227,11 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) { case MHD_CONNECTION_INIT: line = get_next_header_line (connection); - if (NULL == line) + /* Check for empty string, as we might want + to tolerate 'spurious' empty lines; also + NULL means we didn't get a full line yet. */ + if ( (NULL == line) || + (0 == strlen (line) ) ) { if (MHD_CONNECTION_INIT != connection->state) continue;