@ -379,26 +379,24 @@ static uint8_t client_parse(Client *client, int size) {
str = & client - > buffer [ client - > parser_offset ] ;
//printf("checking header: '%s'\n", str);
if ( strnc mp( str , " Content-Length: " , sizeof ( " Content-Length: " ) - 1 ) = = 0 ) {
if ( strnc asec mp( str , " Content-Length: " , sizeof ( " Content-Length: " ) - 1 ) = = 0 ) {
/* content length header */
client - > content_length = str_to_uint64 ( str + sizeof ( " Content-Length: " ) - 1 ) ;
} else if ( strnc mp( str , " Connection: " , sizeof ( " Connection: " ) - 1 ) = = 0 ) {
} else if ( strnc asec mp( str , " Connection: " , sizeof ( " Connection: " ) - 1 ) = = 0 ) {
/* connection header */
str + = sizeof ( " Connection: " ) - 1 ;
if ( strnc mp( str , " close " , sizeof ( " close " ) - 1 ) = = 0 )
if ( strnc asec mp( str , " close " , sizeof ( " close " ) - 1 ) = = 0 )
client - > keepalive = 0 ;
else if ( strncmp ( str , " Keep-Alive " , sizeof ( " Keep-Alive " ) - 1 ) = = 0 )
client - > keepalive = client - > worker - > config - > keep_alive ;
else if ( strncmp ( str , " keep-alive " , sizeof ( " keep-alive " ) - 1 ) = = 0 )
else if ( strncasecmp ( str , " keep-alive " , sizeof ( " keep-alive " ) - 1 ) = = 0 )
client - > keepalive = client - > worker - > config - > keep_alive ;
else
return 0 ;
} else if ( strnc mp( str , " Transfer-Encoding: " , sizeof ( " Transfer-Encoding: " ) - 1 ) = = 0 ) {
} else if ( strnc asec mp( str , " Transfer-Encoding: " , sizeof ( " Transfer-Encoding: " ) - 1 ) = = 0 ) {
/* transfer encoding header */
str + = sizeof ( " Transfer-Encoding: " ) - 1 ;
if ( strnc mp( str , " chunked " , sizeof ( " chunked " ) - 1 ) = = 0 )
if ( strnc asec mp( str , " chunked " , sizeof ( " chunked " ) - 1 ) = = 0 )
client - > chunked = 1 ;
else
return 0 ;