File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -786,9 +786,12 @@ static int match_extension(const char *path, const char *ext_list) {
786786static int should_keep_alive (const struct mg_connection * conn ) {
787787 const char * http_version = conn -> request_info .http_version ;
788788 const char * header = mg_get_header (conn , "Connection" );
789- return (!mg_strcasecmp (conn -> ctx -> config [ENABLE_KEEP_ALIVE ], "yes" ) &&
790- (header == NULL && http_version && !strcmp (http_version , "1.1" ))) ||
791- (header != NULL && !mg_strcasecmp (header , "keep-alive" ));
789+
790+ if (mg_strcasecmp (conn -> ctx -> config [ENABLE_KEEP_ALIVE ], "yes" ) != 0 )
791+ return 0 ;
792+
793+ return (header == NULL && http_version && !strcmp (http_version , "1.1" )) ||
794+ (header != NULL && !mg_strcasecmp (header , "keep-alive" ));
792795}
793796
794797static const char * suggest_connection_header (const struct mg_connection * conn ) {
You can’t perform that action at this time.
0 commit comments