| /lighttpd1.4/src/ |
| H A D | http_date.c | 79 if (s[0] == p[0] && s[1] == p[1] && s[2] == p[2]) break; in http_date_parse_RFC_850() 85 while (*s != ',' && *s != '\0') ++s; in http_date_parse_RFC_850() 87 if (s[0] != ',' || s[1] != ' ' in http_date_parse_RFC_850() 95 if (s[5] == p[0] && s[6] == p[1] && s[7] == p[2]) break; in http_date_parse_RFC_850() 117 if (s[20] != ' ' || s[21] != 'G' || s[22] != 'M' || s[23] != 'T') in http_date_parse_RFC_850() 140 if (s[0] == p[0] && s[1] == p[1] && s[2] == p[2]) break; in http_date_parse_asctime() 148 if (s[4] == p[0] && s[5] == p[1] && s[6] == p[2]) break; in http_date_parse_asctime() 153 if (s[7] != ' ' || (s[8] != ' ' && !light_isdigit(s[8])) in http_date_parse_asctime() 194 if (s[0] == p[0] && s[1] == p[1] && s[2] == p[2]) break; in http_date_parse_IMF_fixdate() 207 if (s[8] == p[0] && s[9] == p[1] && s[10] == p[2]) break; in http_date_parse_IMF_fixdate() [all …]
|
| H A D | burl.c | 72 else if (s[i]=='%' && li_cton(s[i+1], n1) && li_cton(s[i+2], n2)) { in burl_normalize_basic_unreserved_fix() 109 else if (s[i]=='%' && li_cton(s[i+1], n1) && li_cton(s[i+2], n2) in burl_normalize_basic_unreserved() 186 else if (s[i]=='%' && li_cton(s[i+1], n1) && li_cton(s[i+2], n2) in burl_normalize_basic_required() 215 if (s[i] == '%' && (s[i+1] < '2' || (s[i+1] == '7' && s[i+2] == 'F'))) in burl_contains_ctrls() 228 s[j] = s[i]; in burl_normalize_qs20_to_plus_fix() 229 if (s[i] == '%' && s[i+1] == '2' && s[i+2] == '0') { in burl_normalize_qs20_to_plus_fix() 245 if (s[i] == '%' && s[i+1] == '2' && s[i+2] == '0') break; in burl_normalize_qs20_to_plus() 258 s[j] = s[i]; in burl_normalize_2F_to_slash_fix() 259 if (s[i] == '%' && s[i+1] == '2' && s[i+2] == 'F') { in burl_normalize_2F_to_slash_fix() 281 if (s[i] == '%' && s[i+1] == '2' && s[i+2] == 'F') { in burl_normalize_2F_to_slash() [all …]
|
| H A D | http_etag.c | 18 http_etag_matches (const buffer * const etag, const char *s, const int weak_ok) in http_etag_matches() argument 20 if ('*' == s[0] && '\0' == s[1]) return 1; in http_etag_matches() 32 while (*s) { in http_etag_matches() 33 while (*s == ' ' || *s == '\t' || *s == ',') ++s; in http_etag_matches() 34 if (s[0] == 'W' && s[1] == '/' ? (s+=2, weak_ok) : 1) { in http_etag_matches() 35 if (0 == strncmp(s, etag_ptr, etag_sz) || *s == '*') { in http_etag_matches() 36 s += (*s != '*' ? etag_sz : 1); in http_etag_matches() 37 if (*s == '\0' || *s == ' ' || *s == '\t' || *s == ',') in http_etag_matches() 41 while (*s != '\0' && *s != ',') ++s; in http_etag_matches()
|
| H A D | buffer.c | 143 return s; in buffer_extend() 163 if (__builtin_expect( (NULL == s), 0)) s = ""; in buffer_copy_string() 164 buffer_copy_string_len(b, s, strlen(s)); in buffer_copy_string() 178 if (__builtin_expect( (NULL == s), 0)) s = ""; in buffer_append_string() 179 buffer_append_string_len(b, s, strlen(s)); in buffer_append_string() 226 s = mempcpy(s, iov[i].iov_base, iov[i].iov_len); in buffer_append_iovec() 272 d[i] = (!light_isupper(s[i])) ? s[i] : s[i] | 0x20; in buffer_copy_string_len_lc() 728 for (const char * const end = s+len; s < end; ++s) { in buffer_append_bs_escaped() 776 for (const char * const end = s+len; s < end; ++s) { in buffer_append_bs_escaped_json() 990 if (light_isupper(s[i])) s[i] |= 0x20; in buffer_to_lower() [all …]
|
| H A D | http_header.c | 140 return (light_isdigit(s[0]) && light_isdigit(s[1]) && light_isdigit(s[2]) in http_header_str_to_code() 141 && (s[3] == '\0' || s[3] == ' ' || s[3] == '\t')) in http_header_str_to_code() 142 ? (s[0]-'0')*100 + (s[1]-'0')*10 + (s[2]-'0') in http_header_str_to_code() 153 while (i < slen && (s[i]==' ' || s[i]=='\t' || s[i]==',')) ++i; in http_header_str_contains_token() 157 if (i == slen || s[i]==' ' || s[i]=='\t' || s[i]==',' || s[i]==';') in http_header_str_contains_token() 171 for (char *s = b->ptr; s; ) { in http_header_remove_token() local 172 while (*s == ' ' || *s == '\t' || *s == ',') ++s; in http_header_remove_token() 175 if (*s=='\0' || *s==' ' || *s=='\t' || *s==',' || *s==';') { in http_header_remove_token() 177 while (*s != '\0' && *s != ',') ++s; in http_header_remove_token() 184 for (s -= mlen; *s != ',' && s != b->ptr; --s) ; in http_header_remove_token() [all …]
|
| H A D | mod_magnet.c | 976 int rc = li_hex2bin(p, s.len >> 1, s.ptr, s.len); in magnet_hexdec() 1063 for (const char * const end = s+len; s < end; ++s) { in magnet_buffer_append_bsdec() 1450 do { ++s; } while (*s && *s != '"' && (*s != '\\' || (s[1] ? ++s : 0))); in magnet_scan_quoted_string() 1481 && *s!=';' && *s!=' ' && *s!='\t' && *s!='\r' && *s!='\n' && *s) in magnet_cookie_param_push_token() 1494 while (*s==';' || *s==' ' || *s=='\t' || *s=='\r' || *s=='\n') in magnet_cookie_tokens() 1498 while ( *s==' ' || *s=='\t' || *s=='\r' || *s=='\n') in magnet_cookie_tokens() 1503 } while ( *s==' ' || *s=='\t' || *s=='\r' || *s=='\n'); in magnet_cookie_tokens() 1522 while ( *s!=' ' && *s!='\t' && *s!='\r' && *s!='\n' in magnet_push_token() 1523 && *s!=',' && *s!=';' && *s!='=' && *s) in magnet_push_token() 1550 while ( *s==' ' || *s=='\t' || *s=='\r' || *s=='\n') in magnet_header_tokens() [all …]
|
| H A D | http_cgi.c | 129 const char *s; in http_cgi_headers() local 142 s = r->target_orig.ptr; in http_cgi_headers() 228 force_assert(s); in http_cgi_headers() 229 rc |= cb(vdata, CONST_STR_LEN("SERVER_PROTOCOL"), s, strlen(s)); in http_cgi_headers() 236 s = ""; in http_cgi_headers() 259 s = "0"; in http_cgi_headers() 275 if (s) in http_cgi_headers() 278 s = ""; in http_cgi_headers() 281 s = ""; in http_cgi_headers() 289 s = ""; in http_cgi_headers() [all …]
|
| H A D | mod_extforward.c | 650 } while (s[i] != '"' && s[i] != '\0' && (s[i] != '\\' || s[++i] != '\0')); in find_end_quoted_string() 656 for (; s[i] != '=' && s[i] != ';' && s[i] != ',' && s[i] != '\0'; ++i) { in find_next_semicolon_or_comma_or_eq() 667 for (; s[i] != ';' && s[i] != ',' && s[i] != '\0'; ++i) { in find_next_semicolon_or_comma() 726 while (s[i] == ' ' || s[i] == '\t') ++i; in mod_extforward_Forwarded() 792 if (vlen > v+1 && s[v] == '"' && s[vlen-1] == '"') { in mod_extforward_Forwarded() 805 else if (s[v] != '_' && s[v] != '/' && s[v] != 'u') { in mod_extforward_Forwarded() 823 if (s[v] != '_' && s[v] != '/' in mod_extforward_Forwarded() 1421 ++s; in mod_extforward_hap_PROXY_v1() 1422 if (s[0] == 'T' && s[1] == 'C' && s[2] == 'P' && s[4] == ' ') { in mod_extforward_hap_PROXY_v1() 1431 s += 5; in mod_extforward_hap_PROXY_v1() [all …]
|
| H A D | mod_setenv.c | 91 for (char *s = ds->value.ptr; (s = strchr(s, ',')); ++s) { in mod_setenv_prep_ext() local 92 if (s[1] == '\r') *++s = ' '; in mod_setenv_prep_ext() 93 if (s[1] == '\n') *++s = ' '; in mod_setenv_prep_ext() 96 const char *s = ds->value.ptr; in mod_setenv_prep_ext() local 98 while (n-- && (s[n]==' ' || s[n]=='\t' || s[n]=='\r' || s[n]=='\n')) ; in mod_setenv_prep_ext() 100 s = ds->value.ptr; in mod_setenv_prep_ext() 101 while (*s==' ' || *s=='\t' || *s=='\r' || *s=='\n') ++s; in mod_setenv_prep_ext() 102 if (s != ds->value.ptr) { in mod_setenv_prep_ext() 104 memmove(ds->value.ptr, s, n); in mod_setenv_prep_ext() 109 s = ds->value.ptr; in mod_setenv_prep_ext() [all …]
|
| H A D | mod_openssl.c | 1469 x.tm_year = (s[0]-'0')*10 + (s[1]-'0'); in mod_openssl_asn1_time_to_posix() 1476 x.tm_year = (s[0]-'0')*1000+(s[1]-'0')*100+(s[2]-'0')*10+(s[3]-'0'); in mod_openssl_asn1_time_to_posix() 1482 x.tm_mon = (s[0]-'0')*10 + (s[1]-'0'); in mod_openssl_asn1_time_to_posix() 1483 x.tm_mday = (s[2]-'0')*10 + (s[3]-'0'); in mod_openssl_asn1_time_to_posix() 1484 x.tm_hour = (s[4]-'0')*10 + (s[5]-'0'); in mod_openssl_asn1_time_to_posix() 1488 if (len >= 2 && s[0] != '+' && s[0] != '-' && s[0] != 'Z') { in mod_openssl_asn1_time_to_posix() 1490 x.tm_min = (s[0]-'0')*10 + (s[1]-'0'); in mod_openssl_asn1_time_to_posix() 1492 if (len >= 2 && s[0] != '+' && s[0] != '-' && s[0] != 'Z') { in mod_openssl_asn1_time_to_posix() 1499 do { ++s; --len; } while (*s >= '0' && *s <= '9'); in mod_openssl_asn1_time_to_posix() 1504 if ((*s == '-' || *s == '+') && len != 5) { in mod_openssl_asn1_time_to_posix() [all …]
|
| H A D | ck.c | 102 return s; in ck_memset_compat() 108 ck_memclear_func(s, c, n); in ck_memset_compat() 113 ck_memclear_s_hook(s, n); in ck_memset_compat() 116 return s; in ck_memset_compat() 131 if (NULL == s) in ck_memclear_s() 151 explicit_bzero(s, n); in ck_memclear_s() 153 memset_explicit(s, 0, n); in ck_memclear_s() 155 explicit_memset(s, 0, n); in ck_memclear_s() 157 SecureZeroMemory(s, n); in ck_memclear_s() 159 ck_memset_compat(s, 0, n); in ck_memclear_s() [all …]
|
| H A D | mod_authn_ldap.c | 79 if (NULL != s->ldap) ldap_unbind_ext_s(s->ldap, NULL, NULL); in FREE_FUNC() 80 free(s); in FREE_FUNC() 576 return s->auth_ldap_binddn in mod_authn_ldap_rebind_proc() 594 if (s->ldap != NULL) { in mod_authn_ldap_search() 612 s->ldap = mod_authn_ldap_host_init(errh, s); in mod_authn_ldap_search() 613 if (NULL == s->ldap) { in mod_authn_ldap_search() 617 ldap_set_rebind_proc(s->ldap, mod_authn_ldap_rebind_proc, s); in mod_authn_ldap_search() 618 ret = mod_authn_ldap_rebind_proc(s->ldap, NULL, 0, 0, s); in mod_authn_ldap_search() 620 ldap_destroy(s->ldap); in mod_authn_ldap_search() 621 s->ldap = NULL; in mod_authn_ldap_search() [all …]
|
| H A D | h2.c | 242 | (uint32_t)s[3]; in h2_u32() 263 return h2_u32(s) >> 8; in h2_u24() 574 s[4] = H2_FLAG_ACK; in h2_recv_ping() 1000 pad = s[9]; in h2_recv_data() 1227 flags = s[n+4]; in h2_recv_continuation() 1291 s[9] = 0; in h2_recv_continuation() 1314 flags = s[n+4]; in h2_recv_continuation() 1315 memmove(s+m, s+n+9, flen); in h2_recv_continuation() 1329 memmove(s+m, s+n, clen-n); in h2_recv_continuation() 1872 if (s[3] != H2_FTYPE_HEADERS || (s[4] & H2_FLAG_END_HEADERS)) in h2_want_read() [all …]
|
| H A D | mod_proxy.c | 495 if (NULL == (s = strchr(s, ':')) || s[1] != '/' || s[2] != '/') return; in http_header_remap_uri() 499 if (NULL != (s = strchr(s, '/'))) { in http_header_remap_uri() 545 for (char *s = b->ptr+off, *e; *s; s = e) { in http_header_remap_setcookie() local 548 while (*s != ';' && *s != '\n' && *s != '\0') ++s; in http_header_remap_setcookie() 554 do { ++s; } while (*s == ' ' || *s == '\t'); in http_header_remap_setcookie() 632 while (s[i] == ' ' || s[i] == '\t' || s[i] == ',') ++i; in proxy_set_Forwarded() 637 } while (s[i]!=' ' && s[i]!='\t' && s[i]!=',' && s[i]!='\0'); in proxy_set_Forwarded() 953 s[0] = '\r'; in proxy_create_env() 954 s[1] = '\n'; in proxy_create_env() 957 s[0] = ':'; in proxy_create_env() [all …]
|
| H A D | plugin_config.h | 117 const char *s; member 209 #define plugin_stats_get_ptr(s, len) \ argument 210 array_get_int_ptr(&plugin_stats, (s), (len)) 212 #define plugin_stats_incr(s, len) \ argument 213 (++(*array_get_int_ptr(&plugin_stats, (s), (len)))) 215 #define plugin_stats_inc(s) \ argument 216 plugin_stats_incr((s), sizeof(s)-1) 218 #define plugin_stats_decr(s, len) \ argument 219 (--(*array_get_int_ptr(&plugin_stats, (s), (len)))) 221 #define plugin_stats_set(s, len, val) \ argument [all …]
|
| H A D | mod_vhostdb_ldap.c | 282 if (s->starttls) { in mod_authn_ldap_host_init() 285 if (s->cafile in mod_authn_ldap_host_init() 334 return mod_authn_ldap_bind(s->errh, ld, s->binddn, s->bindpw); in mod_authn_ldap_rebind_proc() 348 if (s->ldap != NULL) { in mod_authn_ldap_search() 366 s->ldap = mod_authn_ldap_host_init(errh, s); in mod_authn_ldap_search() 367 if (NULL == s->ldap) { in mod_authn_ldap_search() 371 ldap_set_rebind_proc(s->ldap, mod_authn_ldap_rebind_proc, s); in mod_authn_ldap_search() 372 ret = mod_authn_ldap_bind(errh, s->ldap, s->binddn, s->bindpw); in mod_authn_ldap_search() 374 ldap_destroy(s->ldap); in mod_authn_ldap_search() 375 s->ldap = NULL; in mod_authn_ldap_search() [all …]
|
| H A D | keyvalue.c | 462 if (s[i]=='%' && li_cton(s[i+1],n1) && li_cton(s[i+2],n2)) { in pcre_keyvalue_burl_percent_toupper() 476 if (s[i] == '%' && s[i+1]=='%' in pcre_keyvalue_burl_percent_percent_toupper() 477 && li_cton(s[i+2],n1) && li_cton(s[i+3],n2)) { in pcre_keyvalue_burl_percent_percent_toupper() 494 if (s[i] > 0x7F) ++count; in pcre_keyvalue_burl_percent_high_UTF8() 500 if (s[i] <= 0x7F) in pcre_keyvalue_burl_percent_high_UTF8() 501 p[j] = s[i]; in pcre_keyvalue_burl_percent_high_UTF8() 505 p[++j] = hex_chars_uc[s[i] & 0xF]; in pcre_keyvalue_burl_percent_high_UTF8() 518 if (s[i] > 0x7F) ++count; in pcre_keyvalue_burl_percent_percent_high_UTF8() 524 if (s[i] <= 0x7F) in pcre_keyvalue_burl_percent_percent_high_UTF8() 525 p[j] = s[i]; in pcre_keyvalue_burl_percent_percent_high_UTF8() [all …]
|
| H A D | network.c | 130 s[0] = '\\'; in network_abstract_socket_enc() 131 s[1] = 'x'; in network_abstract_socket_enc() 134 s += 4; in network_abstract_socket_enc() 151 if (s[0] != '\\') in network_abstract_socket_dec() 153 else if (s[1] == 'x' in network_abstract_socket_dec() 157 s += 4; in network_abstract_socket_dec() 162 return *s == '\0' ? n : 0; in network_abstract_socket_dec() 363 int use_ipv6 = s->use_ipv6; in network_server_init() 408 if (s->set_v6only) { in network_server_init() 564 if (s->ssl_enabled) { in network_server_init() [all …]
|
| H A D | mod_wolfssl.c | 340 UNUSED(s); in ssl_tlsext_ticket_key_cb() 555 if (s->ssl_ctx && s->ssl_ctx != ssl_ctx_global_scope) in mod_openssl_free_config() 2101 if (SSL_CTX_set_cipher_list(s->ssl_ctx,s->ssl_cipher_list->ptr)!=1){ in network_init_ssl() 2172 s->ssl_ctx, s->pc->ssl_pemfile->ptr, srv->errh)) in network_init_ssl() 2182 s->pc->ssl_pemfile->ptr, s->pc->ssl_privkey->ptr); in network_init_ssl() 2190 s->pc->ssl_pemfile->ptr, s->pc->ssl_privkey->ptr); in network_init_ssl() 2194 SSL_CTX_set_default_read_ahead(s->ssl_ctx, s->ssl_read_ahead); in network_init_ssl() 2246 if (s->ssl_conf_cmd && s->ssl_conf_cmd->used) { in network_init_ssl() 3301 const char *s; in http_cgi_ssl_env() local 3305 http_header_env_set(r, CONST_STR_LEN("SSL_PROTOCOL"), s, strlen(s)); in http_cgi_ssl_env() [all …]
|
| H A D | mod_nss.c | 229 msg, s ? s : "", PR_ErrorToString(rc, 0)); in elog() 837 if (s->model && s->model != global_model) in mod_nss_free_config() 1653 if (s->ssl_conf_cmd && s->ssl_conf_cmd->used) { in network_init_ssl() 2516 if (s) in https_add_ssl_client_verify_err() 2517 buffer_append_string_len(b, s, strlen(s)); in https_add_ssl_client_verify_err() 2520 buffer_append_string_len(b, s, strlen(s)); in https_add_ssl_client_verify_err() 2550 if (s) { in https_add_ssl_client_entries() 2553 s, strlen(s)); in https_add_ssl_client_entries() 2724 UNUSED(s); in mod_nss_ssl_conf_curves() 3100 UNUSED(s); in nss_parse_ciphers() [all …]
|
| H A D | buffer.h | 102 void buffer_copy_string(buffer * restrict b, const char * restrict s); 103 void buffer_copy_string_len(buffer * restrict b, const char * restrict s, size_t len); 104 void buffer_copy_string_len_lc(buffer * restrict b, const char * restrict s, size_t len); 106 void buffer_append_string(buffer * restrict b, const char * restrict s); 107 void buffer_append_string_len(buffer * restrict b, const char * restrict s, size_t len); 139 #define li_tohex(buf,buf_len,s,s_len) li_tohex_lc((buf),(buf_len),(s),(s_len)) argument 141 void li_tohex_lc(char * restrict buf, size_t buf_len, const char * restrict s, size_t s_len); 143 void li_tohex_uc(char * restrict buf, size_t buf_len, const char * restrict s, size_t s_len); 155 int buffer_eq_icase_slen(const buffer * const b, const char * const s, const size_t slen); 159 int buffer_eq_slen(const buffer * const b, const char * const s, const size_t slen); [all …]
|
| H A D | http_range.c | 81 http_range_parse_next (const char * restrict s, const off_t len, in http_range_parse_next() argument 88 off_t n = strtoll(s, &e, 10); in http_range_parse_next() 91 if (n != LLONG_MAX && n < len && s != e) { in http_range_parse_next() 95 n = strtoll((s = e+1), &e, 10); in http_range_parse_next() 96 if (s == e || (n == 0 && e[-1] != '0')) in http_range_parse_next() 113 http_range_parse (const char * restrict s, const off_t content_length, in http_range_parse() argument 134 s = http_range_parse_next(s, content_length, ranges+n); in http_range_parse() 135 if ((*s == '\0' || *s == ',') && ranges[n+1] != -1) in http_range_parse() 138 while (*s != '\0' && *s != ',') ++s; /*ignore invalid ranges*/ in http_range_parse() 139 } while (*s++ != '\0' && n < RMAX*2); in http_range_parse()
|
| H A D | http_kv.c | 162 static int keyvalue_get_key(const keyvalue *kv, const char * const s, const unsigned int slen) 165 while (kv->vlen && (kv->vlen != slen || 0 != memcmp(kv->value, s, slen))) 183 int get_http_version_key(const char *s, size_t slen) { 184 return keyvalue_get_key(http_versions, s, (unsigned int)slen); 188 http_method_t get_http_method_key(const char *s, const size_t slen) { in get_http_method_key() argument 189 if (slen == 3 && s[0] == 'G' && s[1] == 'E' && s[2] == 'T') in get_http_method_key() 192 while (kv->used && (kv->used-1 != slen || 0 != memcmp(kv->ptr, s, slen))) in get_http_method_key()
|
| H A D | mod_mbedtls.c | 460 if (s->ssl_ctx && s->ssl_ctx != ssl_ctx_global_scope) { in mod_mbedtls_free_config() 1477 s->ssl_pemfile->ptr, s->ssl_privkey->ptr); in network_init_ssl() 1513 if (s->ssl_conf_cmd && s->ssl_conf_cmd->used) { in network_init_ssl() 2608 const char *s; in http_cgi_ssl_env() local 2611 http_header_env_set(r, CONST_STR_LEN("SSL_PROTOCOL"), s, strlen(s)); in http_cgi_ssl_env() 2620 http_header_env_set(r, CONST_STR_LEN("SSL_CIPHER"), s, strlen(s)); in http_cgi_ssl_env() 3494 #define strncmp_const(s,cs) strncmp((s),(cs),sizeof(cs)-1) in mod_mbedtls_ssl_conf_ciphersuites() argument 3930 if (cipherstring != s->ssl_cipher_list && s->ssl_cipher_list) in mod_mbedtls_ssl_conf_ciphersuites() 3957 mbedtls_ssl_conf_ciphersuites(s->ssl_ctx, s->ciphersuites); in mod_mbedtls_ssl_conf_ciphersuites() 4016 mbedtls_ssl_conf_curves(s->ssl_ctx, s->curves); in mod_mbedtls_ssl_conf_curves() [all …]
|
| /lighttpd1.4/tests/ |
| H A D | LightyTest.pm | 348 diag(sprintf("\nunexpected line '%s'", $line)); 379 diag(sprintf("\nproto failed: expected '%s', got '%s'", $href->{'HTTP-Protocol'}, $1)); 383 diag(sprintf("\nstatus failed: expected '%s', got '%s'", $href->{'HTTP-Status'}, $2)); 387 diag(sprintf("\nunexpected resp_line '%s'", $resp_line)); 394 diag(sprintf("\nbody failed: expected '%s', got '%s'", $href->{'HTTP-Content'}, $resp_body)); 401 diag(sprintf("\nbody failed: expected empty body, got '%s'", $resp_body)); 429 diag(sprintf("\nheader '%s' MUST not be set", $k)); 434 diag(sprintf("\nrequired header '%s' is missing", $k)); 443 "\nresponse-header failed: expected '%s', got '%s', regex: %s", 449 "\nresponse-header failed: expected '%s', got '%s'", [all …]
|