[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r36641 - libmicrohttpd/src/microhttpd
From: |
gnunet |
Subject: |
[GNUnet-SVN] r36641 - libmicrohttpd/src/microhttpd |
Date: |
Wed, 4 Nov 2015 16:23:10 +0100 |
Author: Karlson2k
Date: 2015-11-04 16:23:10 +0100 (Wed, 04 Nov 2015)
New Revision: 36641
Modified:
libmicrohttpd/src/microhttpd/connection.c
Log:
connection.c: use faster and better checks for empty lines
Modified: libmicrohttpd/src/microhttpd/connection.c
===================================================================
--- libmicrohttpd/src/microhttpd/connection.c 2015-11-03 22:56:54 UTC (rev
36640)
+++ libmicrohttpd/src/microhttpd/connection.c 2015-11-04 15:23:10 UTC (rev
36641)
@@ -666,7 +666,7 @@
int must_add_content_length;
EXTRA_CHECK (NULL != connection->version);
- if (0 == strlen (connection->version))
+ if (0 == connection->version[0])
{
data = MHD_pool_allocate (connection->pool, 0, MHD_YES);
connection->write_buffer = data;
@@ -1796,7 +1796,7 @@
return MHD_NO;
}
/* we still have the current line to deal with... */
- if (0 != strlen (line))
+ if (0 != line[0])
{
if (MHD_NO == process_header_line (connection, line))
{
@@ -2231,7 +2231,7 @@
to tolerate 'spurious' empty lines; also
NULL means we didn't get a full line yet. */
if ( (NULL == line) ||
- (0 == strlen (line) ) )
+ (0 == line[0]) )
{
if (MHD_CONNECTION_INIT != connection->state)
continue;
@@ -2262,7 +2262,7 @@
}
break;
}
- if (strlen (line) == 0)
+ if (0 == line[0])
{
connection->state = MHD_CONNECTION_HEADERS_RECEIVED;
continue;
@@ -2293,7 +2293,7 @@
if (MHD_NO ==
process_broken_line (connection, line, MHD_HEADER_KIND))
continue;
- if (0 == strlen (line))
+ if (0 == line[0])
{
connection->state = MHD_CONNECTION_HEADERS_RECEIVED;
continue;
@@ -2370,7 +2370,7 @@
}
break;
}
- if (0 == strlen (line))
+ if (0 == line[0])
{
connection->state = MHD_CONNECTION_FOOTERS_RECEIVED;
continue;
@@ -2401,7 +2401,7 @@
if (MHD_NO ==
process_broken_line (connection, line, MHD_FOOTER_KIND))
continue;
- if (0 == strlen (line))
+ if (0 == line[0])
{
connection->state = MHD_CONNECTION_FOOTERS_RECEIVED;
continue;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r36641 - libmicrohttpd/src/microhttpd,
gnunet <=