aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r--src/microhttpd/connection.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 5e5c2f13..1c6070e8 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -2846,15 +2846,15 @@ parse_cookies_string (char *str,
2846 size_t i; 2846 size_t i;
2847 bool non_strict; 2847 bool non_strict;
2848 /* Skip extra whitespaces and empty cookies */ 2848 /* Skip extra whitespaces and empty cookies */
2849 const bool allow_wsp_empty = (0 >= connection->daemon->strict_for_client); 2849 const bool allow_wsp_empty = (0 >= connection->daemon->client_discipline);
2850 /* Allow whitespaces around '=' character */ 2850 /* Allow whitespaces around '=' character */
2851 const bool wsp_around_eq = (0 > connection->daemon->strict_for_client); 2851 const bool wsp_around_eq = (-3 >= connection->daemon->client_discipline);
2852 /* Allow whitespaces in quoted cookie value */ 2852 /* Allow whitespaces in quoted cookie value */
2853 const bool wsp_in_quoted = (0 >= connection->daemon->strict_for_client); 2853 const bool wsp_in_quoted = (0 >= connection->daemon->client_discipline);
2854 /* Allow tab as space after semicolon between cookies */ 2854 /* Allow tab as space after semicolon between cookies */
2855 const bool tab_as_sp = (0 >= connection->daemon->strict_for_client); 2855 const bool tab_as_sp = (0 >= connection->daemon->client_discipline);
2856 /* Allow no space after semicolon between cookies */ 2856 /* Allow no space after semicolon between cookies */
2857 const bool allow_no_space = (0 >= connection->daemon->strict_for_client); 2857 const bool allow_no_space = (0 >= connection->daemon->client_discipline);
2858 2858
2859 non_strict = false; 2859 non_strict = false;
2860 i = 0; 2860 i = 0;
@@ -3327,7 +3327,7 @@ parse_initial_message_line (struct MHD_Connection *connection,
3327 uri_len = line_len - (size_t) (uri - line); 3327 uri_len = line_len - (size_t) (uri - line);
3328 } 3328 }
3329 /* check for spaces in URI if we are "strict" */ 3329 /* check for spaces in URI if we are "strict" */
3330 if ( (1 <= daemon->strict_for_client) && 3330 if ( (-2 < daemon->client_discipline) &&
3331 (NULL != memchr (uri, 3331 (NULL != memchr (uri,
3332 ' ', 3332 ' ',
3333 uri_len)) ) 3333 uri_len)) )
@@ -3752,7 +3752,7 @@ process_header_line (struct MHD_Connection *connection,
3752 /* error in header line, die hard */ 3752 /* error in header line, die hard */
3753 return MHD_NO; 3753 return MHD_NO;
3754 } 3754 }
3755 if (-1 >= connection->daemon->strict_for_client) 3755 if (-3 < connection->daemon->client_discipline)
3756 { 3756 {
3757 /* check for whitespace before colon, which is not allowed 3757 /* check for whitespace before colon, which is not allowed
3758 by RFC 7230 section 3.2.4; we count space ' ' and 3758 by RFC 7230 section 3.2.4; we count space ' ' and
@@ -3897,7 +3897,7 @@ parse_connection_headers (struct MHD_Connection *connection)
3897 return; 3897 return;
3898 } 3898 }
3899#endif /* COOKIE_SUPPORT */ 3899#endif /* COOKIE_SUPPORT */
3900 if ( (1 <= connection->daemon->strict_for_client) && 3900 if ( (-3 < connection->daemon->client_discipline) &&
3901 (MHD_IS_HTTP_VER_1_1_COMPAT (connection->rq.http_ver)) && 3901 (MHD_IS_HTTP_VER_1_1_COMPAT (connection->rq.http_ver)) &&
3902 (MHD_NO == 3902 (MHD_NO ==
3903 MHD_lookup_connection_value_n (connection, 3903 MHD_lookup_connection_value_n (connection,
@@ -3946,7 +3946,7 @@ parse_connection_headers (struct MHD_Connection *connection)
3946 NULL)) 3946 NULL))
3947 { 3947 {
3948 /* TODO: add individual settings */ 3948 /* TODO: add individual settings */
3949 if (1 <= connection->daemon->strict_for_client) 3949 if (1 <= connection->daemon->client_discipline)
3950 { 3950 {
3951 transmit_error_response_static (connection, 3951 transmit_error_response_static (connection,
3952 MHD_HTTP_BAD_REQUEST, 3952 MHD_HTTP_BAD_REQUEST,