| /lighttpd1.4/src/ |
| H A D | http_header.c | 197 if (!buffer_is_blank(vb)) in http_header_token_append() 199 buffer_append_string_len(vb, v, vlen); in http_header_token_append() 206 if (!buffer_is_blank(vb)) in http_header_token_append_cookie() 208 buffer_append_string_len(vb, v, vlen); in http_header_token_append_cookie() 234 buffer_clear(vb); in http_header_response_set_ptr() 235 return vb; in http_header_response_set_ptr() 263 http_header_token_append(vb, v, vlen); in http_header_response_append() 301 buffer_clear(vb); in http_header_request_set_ptr() 302 return vb; in http_header_request_set_ptr() 346 buffer_clear(vb); in http_header_env_set_ptr() [all …]
|
| H A D | mod_expire.c | 287 buffer *vb; in mod_expire_set_header() local 289 vb = http_header_response_set_ptr(r, HTTP_HEADER_CACHE_CONTROL, in mod_expire_set_header() 291 buffer_append_string_len(vb, CONST_STR_LEN("max-age=")); in mod_expire_set_header() 292 buffer_append_int(vb, expires - cur_ts); in mod_expire_set_header() 295 vb = http_header_response_set_ptr(r, HTTP_HEADER_EXPIRES, in mod_expire_set_header() 297 http_date_time_append(vb, expires); in mod_expire_set_header() 305 buffer *vb; in REQUEST_FUNC() local 316 if (NULL != vb) return HANDLER_GO_ON; in REQUEST_FUNC() 327 vb = http_header_response_get(r, HTTP_HEADER_CONTENT_TYPE, CONST_STR_LEN("Content-Type")); in REQUEST_FUNC() 328 if (NULL != vb) in REQUEST_FUNC() [all …]
|
| H A D | http-header-glue.c | 113 buffer *vb; in http_response_redirect_to_directory() local 124 buffer_copy_buffer(vb, o); in http_response_redirect_to_directory() 127 buffer_append_char(vb, '/'); in http_response_redirect_to_directory() 129 buffer_append_str2(vb, CONST_STR_LEN("?"), in http_response_redirect_to_directory() 175 buffer * const vb = in http_response_set_last_modified() local 178 buffer_copy_buffer(vb, strftime_cache_get(lmtime)); in http_response_set_last_modified() 179 return vb; in http_response_set_last_modified() 195 const buffer *vb, *etag; in http_response_handle_cachable() local 213 if (http_etag_matches(etag, vb->ptr, !range_request)) { in http_response_handle_cachable() 230 if (buffer_is_equal(lmod, vb) in http_response_handle_cachable() [all …]
|
| H A D | http_cgi.c | 47 const buffer *vb = http_header_response_get(r, HTTP_HEADER_LOCATION, in http_cgi_local_redir() local 49 if (NULL != vb in http_cgi_local_redir() 50 && vb->ptr[0] == '/' in http_cgi_local_redir() 51 && (0 != strncmp(vb->ptr, r->uri.path.ptr, ulen) in http_cgi_local_redir() 52 || ( vb->ptr[ulen] != '\0' in http_cgi_local_redir() 53 && vb->ptr[ulen] != '/' in http_cgi_local_redir() 54 && vb->ptr[ulen] != '?')) in http_cgi_local_redir() 67 buffer_copy_buffer(&r->target, vb); in http_cgi_local_redir()
|
| H A D | mod_deflate.c | 1128 const buffer *vb; in stream_br_init() local 1482 buffer * const vb = in mod_deflate_using_libdeflate_sm() local 1485 buffer_append_int(vb, hctx->bytes_out); in mod_deflate_using_libdeflate_sm() 1590 buffer * const vb = in mod_deflate_using_libdeflate() local 1876 buffer *vb; in REQUEST_FUNC() local 1952 etaglen = vb ? buffer_clen(vb) : 0; in REQUEST_FUNC() 1964 buffer_append_string(vb, label); in REQUEST_FUNC() 1965 buffer_append_char(vb, '"'); in REQUEST_FUNC() 1993 buffer_append_string(vb, label); in REQUEST_FUNC() 1994 buffer_append_char(vb, '"'); in REQUEST_FUNC() [all …]
|
| H A D | mod_ajp13.c | 442 const buffer *vb; in ajp13_enc_attributes() local 444 vb = http_header_env_get(r, CONST_STR_LEN("REMOTE_USER")); in ajp13_enc_attributes() 445 n = ajp13_enc_attribute(x, n, vb, 0x03); in ajp13_enc_attributes() 447 vb = http_header_env_get(r, CONST_STR_LEN("AUTH_TYPE")); in ajp13_enc_attributes() 448 n = ajp13_enc_attribute(x, n, vb, 0x04); in ajp13_enc_attributes() 462 n = ajp13_enc_attribute(x, n, vb, 0x07); in ajp13_enc_attributes() 464 vb = http_header_env_get(r, CONST_STR_LEN("SSL_CIPHER")); in ajp13_enc_attributes() 465 n = ajp13_enc_attribute(x, n, vb, 0x08); in ajp13_enc_attributes() 468 n = ajp13_enc_attribute(x, n, vb, 0x0B); in ajp13_enc_attributes() 487 vb = http_header_env_get(r, CONST_STR_LEN("AJP13_SECRET")); in ajp13_enc_attributes() [all …]
|
| H A D | mod_auth.c | 684 const buffer *vb = http_header_env_get(r, CONST_STR_LEN("REMOTE_USER")); in mod_auth_uri_handler() local 685 if (NULL != vb && http_auth_match_rules(dauth->require, vb->ptr, NULL, NULL)) { in mod_auth_uri_handler() 775 const buffer * const vb = in mod_auth_check_basic() local 778 if (NULL == vb || !buffer_eq_icase_ssn(vb->ptr, CONST_STR_LEN("Basic "))) in mod_auth_check_basic() 781 if (buffer_clen(vb) < sizeof("Basic ")-1) in mod_auth_check_basic() 785 size_t ulen = buffer_clen(vb) - (sizeof("Basic ")-1); in mod_auth_check_basic() 799 "decoding base64-string failed %s", vb->ptr+sizeof("Basic ")-1); in mod_auth_check_basic() 1498 const buffer * const vb = in mod_auth_check_digest() local 1501 if (NULL == vb || !buffer_eq_icase_ssn(vb->ptr, CONST_STR_LEN("Digest "))) in mod_auth_check_digest() 1504 if (buffer_clen(vb) < sizeof("Digest ")-1) in mod_auth_check_digest() [all …]
|
| H A D | mod_accesslog.c | 632 const buffer * const vb = in accesslog_append_cookie() local 634 if (NULL == vb) return; in accesslog_append_cookie() 636 char *str = vb->ptr; in accesslog_append_cookie() 891 const buffer *vb; in log_access_record() local 901 vb = http_header_request_get(r, f->opt, BUF_PTR_LEN(&f->string)); in log_access_record() 902 accesslog_append_buffer(b, vb, esc); in log_access_record() 906 accesslog_append_buffer(b, vb, esc); in log_access_record() 910 vb = http_header_env_get(r, CONST_STR_LEN("REMOTE_USER")); in log_access_record() 911 accesslog_append_buffer(b, vb, esc); in log_access_record() 918 vb = http_header_env_get(r, BUF_PTR_LEN(&f->string)); in log_access_record() [all …]
|
| H A D | mod_proxy.c | 886 …const buffer *vb = http_header_request_get(r, HTTP_HEADER_CONTENT_LENGTH, CONST_STR_LEN("Content-L… in proxy_create_env() local 887 if (NULL == vb) { in proxy_create_env() 1097 buffer *vb; in proxy_response_headers() local 1099 vb = http_header_response_get(r, HTTP_HEADER_LOCATION, in proxy_response_headers() 1101 if (vb) http_header_remap_uri(vb, 0, remap_hdrs, 0); in proxy_response_headers() 1104 vb = http_header_response_get(r, HTTP_HEADER_CONTENT_LOCATION, in proxy_response_headers() 1106 if (vb) http_header_remap_uri(vb, 0, remap_hdrs, 0); in proxy_response_headers() 1109 vb = http_header_response_get(r, HTTP_HEADER_SET_COOKIE, in proxy_response_headers() 1111 if (vb) http_header_remap_setcookie(vb, 0, remap_hdrs); in proxy_response_headers()
|
| H A D | mod_wstunnel.c | 514 const buffer *vb = in wstunnel_handler_setup() local 516 if (NULL != vb) { in wstunnel_handler_setup() 517 for (const char *s = vb->ptr; *s; ++s) { in wstunnel_handler_setup() 578 const buffer *vb; in mod_wstunnel_check_extension() local 579 vb = http_header_request_get(r, HTTP_HEADER_UPGRADE, CONST_STR_LEN("Upgrade")); in mod_wstunnel_check_extension() 580 if (NULL == vb in mod_wstunnel_check_extension() 581 || !http_header_str_contains_token(BUF_PTR_LEN(vb), CONST_STR_LEN("websocket"))) in mod_wstunnel_check_extension() 583 vb = http_header_request_get(r, HTTP_HEADER_CONNECTION, CONST_STR_LEN("Connection")); in mod_wstunnel_check_extension() 584 if (NULL == vb in mod_wstunnel_check_extension() 585 || !http_header_str_contains_token(BUF_PTR_LEN(vb), CONST_STR_LEN("upgrade"))) in mod_wstunnel_check_extension()
|
| H A D | mod_dirlisting.c | 1247 buffer * const vb = in mod_dirlisting_content_type() local 1251 buffer_copy_string_len(vb, CONST_STR_LEN("text/html")); in mod_dirlisting_content_type() 1253 buffer_append_str2(vb, CONST_STR_LEN("text/html;charset="), in mod_dirlisting_content_type() 1345 const buffer * const vb = in URIHANDLER_FUNC() 1347 p->conf.json = (vb && strstr(vb->ptr, "application/json")); /*(coarse)*/ in URIHANDLER_FUNC() 1457 buffer * const vb = in mod_dirlisting_cache_control() local 1460 buffer_append_string_len(vb, CONST_STR_LEN("max-age=")); in mod_dirlisting_cache_control() 1461 buffer_append_int(vb, max_age); in mod_dirlisting_cache_control() 1603 buffer * const vb = in mod_dirlisting_cache_add() local 1606 http_etag_create(vb, &st, r->conf.etag_flags); in mod_dirlisting_cache_add()
|
| H A D | mod_authn_gssapi.c | 233 buffer * const vb = http_header_env_set_ptr(r, CONST_STR_LEN("KRB5CCNAME")); in mod_authn_gssapi_create_krb5_ccache() local 234 r->plugin_ctx[p->id] = vb; in mod_authn_gssapi_create_krb5_ccache() 236 buffer_copy_string_len(vb, ccname, ccnamelen); in mod_authn_gssapi_create_krb5_ccache() 464 …const buffer *vb = http_header_request_get(r, HTTP_HEADER_AUTHORIZATION, CONST_STR_LEN("Authorizat… in mod_authn_gssapi_check() local 467 if (NULL == vb) { in mod_authn_gssapi_check() 471 if (!buffer_eq_icase_ssn(vb->ptr, CONST_STR_LEN("Negotiate "))) { in mod_authn_gssapi_check() 475 …return mod_authn_gssapi_check_spnego(r, (plugin_data *)p_d, require, vb->ptr+sizeof("Negotiate ")-… in mod_authn_gssapi_check()
|
| H A D | mod_magnet.c | 1681 buffer * const vb = http_header_response_set_ptr(r, id, k.ptr, k.len); in magnet_resphdr_set_kv() local 1682 buffer_copy_string_len(vb, v.ptr, v.len); in magnet_resphdr_set_kv() 1688 for (char *n = vb->ptr; (n = strchr(n, '\n')); ) { in magnet_resphdr_set_kv() 3293 buffer *vb = in magnet_attract() local 3295 if (NULL == vb) { in magnet_attract() 3296 vb = in magnet_attract() 3298 buffer_append_char(vb, '0'); in magnet_attract() 3301 if (++*vb->ptr-'0' >= 10) { in magnet_attract() 3348 const buffer * const vb = http_header_env_get(r, CONST_STR_LEN("REDIRECT_STATUS")); in magnet_attract_array() local 3349 if (vb && (x = http_header_str_to_code(vb->ptr)) != -1) in magnet_attract_array()
|
| H A D | mod_wolfssl.c | 3226 buffer *vb = http_header_env_set_ptr(r, CONST_STR_LEN("SSL_CLIENT_VERIFY")); in https_add_ssl_client_entries() local 3230 buffer_copy_string_len(vb, CONST_STR_LEN("FAILED:")); in https_add_ssl_client_entries() 3231 https_add_ssl_client_verify_err(vb, vr); in https_add_ssl_client_entries() 3234 buffer_copy_string_len(vb, CONST_STR_LEN("NONE")); in https_add_ssl_client_entries() 3237 buffer_copy_string_len(vb, CONST_STR_LEN("SUCCESS")); in https_add_ssl_client_entries() 3271 vb = http_header_env_get(r, BUF_PTR_LEN(varname)); in https_add_ssl_client_entries() 3272 if (vb) { /* same as mod_auth_api.c:http_auth_setenv() */ in https_add_ssl_client_entries() 3275 BUF_PTR_LEN(vb)); in https_add_ssl_client_entries() 3287 vb = http_header_env_set_ptr(r, CONST_STR_LEN("SSL_CLIENT_CERT")); in https_add_ssl_client_entries() 3289 (byte *)buffer_string_prepare_copy(vb,pemsz), in https_add_ssl_client_entries() [all …]
|
| H A D | mod_openssl.c | 3517 buffer *vb = http_header_env_set_ptr(r, CONST_STR_LEN("SSL_CLIENT_VERIFY")); in https_add_ssl_client_entries() local 3521 buffer_copy_string_len(vb, CONST_STR_LEN("FAILED:")); in https_add_ssl_client_entries() 3522 https_add_ssl_client_verify_err(vb, vr); in https_add_ssl_client_entries() 3525 buffer_copy_string_len(vb, CONST_STR_LEN("NONE")); in https_add_ssl_client_entries() 3528 buffer_copy_string_len(vb, CONST_STR_LEN("SUCCESS")); in https_add_ssl_client_entries() 3563 vb = http_header_env_get(r, BUF_PTR_LEN(varname)); in https_add_ssl_client_entries() 3564 if (vb) { /* same as mod_auth_api.c:http_auth_setenv() */ in https_add_ssl_client_entries() 3567 BUF_PTR_LEN(vb)); in https_add_ssl_client_entries() 3580 vb = http_header_env_set_ptr(r, CONST_STR_LEN("SSL_CLIENT_CERT")); in https_add_ssl_client_entries() 3581 buffer_extend(vb, (uint32_t)n); in https_add_ssl_client_entries() [all …]
|
| H A D | response.c | 618 const buffer * const vb = in http_response_errdoc_init() local 621 if (NULL != vb) buffer_copy_buffer((www_auth = buffer_init()), vb); in http_response_errdoc_init()
|
| H A D | mod_gnutls.c | 2826 buffer *vb = http_header_env_set_ptr(r, CONST_STR_LEN("SSL_CLIENT_VERIFY")); in https_add_ssl_client_entries() local 2832 buffer_copy_string_len(vb, CONST_STR_LEN("NONE")); in https_add_ssl_client_entries() 2836 buffer_copy_string_len(vb, CONST_STR_LEN("FAILED:")); in https_add_ssl_client_entries() 2837 https_add_ssl_client_verify_err(vb, hctx->verify_status); in https_add_ssl_client_entries() 2841 buffer_copy_string_len(vb, CONST_STR_LEN("SUCCESS")); in https_add_ssl_client_entries() 2887 vb = http_header_env_get(r, BUF_PTR_LEN(varname)); in https_add_ssl_client_entries() 2888 if (vb) { /* same as mod_auth_api.c:http_auth_setenv() */ in https_add_ssl_client_entries() 2891 BUF_PTR_LEN(vb)); in https_add_ssl_client_entries()
|
| H A D | request.c | 373 const buffer * const vb = http_header_request_get(r, id, k, klen); in http_request_parse_duplicate() local 374 if (vb && buffer_eq_icase_slen(vb, v, vlen)) in http_request_parse_duplicate()
|
| H A D | mod_nss.c | 2530 buffer *vb = http_header_env_set_ptr(r, CONST_STR_LEN("SSL_CLIENT_VERIFY")); in https_add_ssl_client_entries() local 2536 buffer_copy_string_len(vb, CONST_STR_LEN("NONE")); in https_add_ssl_client_entries() 2540 buffer_copy_string_len(vb, CONST_STR_LEN("FAILED:")); in https_add_ssl_client_entries() 2541 https_add_ssl_client_verify_err(vb, hctx->verify_status); in https_add_ssl_client_entries() 2546 buffer_copy_string_len(vb, CONST_STR_LEN("SUCCESS")); in https_add_ssl_client_entries() 2574 vb = http_header_env_get(r, BUF_PTR_LEN(varname)); in https_add_ssl_client_entries() 2575 if (vb) { /* same as mod_auth_api.c:http_auth_setenv() */ in https_add_ssl_client_entries() 2578 BUF_PTR_LEN(vb)); in https_add_ssl_client_entries()
|
| H A D | mod_mbedtls.c | 2543 buffer *vb = http_header_env_set_ptr(r, CONST_STR_LEN("SSL_CLIENT_VERIFY")); in https_add_ssl_client_entries() local 2549 buffer_copy_string_len(vb, CONST_STR_LEN("NONE")); in https_add_ssl_client_entries() 2553 buffer_copy_string_len(vb, CONST_STR_LEN("FAILED:")); in https_add_ssl_client_entries() 2554 https_add_ssl_client_verify_err(vb, rc); in https_add_ssl_client_entries() 2558 buffer_copy_string_len(vb, CONST_STR_LEN("SUCCESS")); in https_add_ssl_client_entries() 2579 vb = http_header_env_get(r, BUF_PTR_LEN(varname)); in https_add_ssl_client_entries() 2580 if (vb) { /* same as mod_auth_api.c:http_auth_setenv() */ in https_add_ssl_client_entries() 2583 BUF_PTR_LEN(vb)); in https_add_ssl_client_entries()
|
| H A D | mod_webdav.c | 2342 const buffer * const vb = in webdav_reqbody_type_xml() local 2345 if (!vb) return 0; in webdav_reqbody_type_xml() 2347 const char * const semi = strchr(vb->ptr, ';'); in webdav_reqbody_type_xml() 2348 uint32_t len = semi ? (uint32_t)(semi - vb->ptr) : buffer_clen(vb); in webdav_reqbody_type_xml() 2349 return ((len==15 && 0==memcmp(vb->ptr, "application/xml", 15)) in webdav_reqbody_type_xml() 2350 || (len==8 && 0==memcmp(vb->ptr, "text/xml", 8))); in webdav_reqbody_type_xml() 5560 const buffer *vb = in mod_webdav_proppatch() local 5563 if (vb && 0 == strncmp(vb->ptr, "Microsoft-WebDAV-MiniRedir/", in mod_webdav_proppatch()
|
| H A D | connections.c | 1827 const buffer * const vb = in connection_check_expect_100() local 1830 if (NULL == vb) in connection_check_expect_100() 1834 int rc = buffer_eq_icase_slen(vb, CONST_STR_LEN("100-continue")); in connection_check_expect_100()
|
| H A D | configfile.c | 1515 const buffer * const vb = &((data_string *)du)->value; in config_print_string() local 1516 char *dst = buffer_string_prepare_append(b, buffer_clen(vb)*2); in config_print_string() 1519 if (vb->ptr) { in config_print_string() 1520 for (const char *p = vb->ptr; *p; ++p) { in config_print_string()
|
| /lighttpd1.4/src/t/ |
| H A D | test_mod_staticfile.c | 44 const buffer *vb; in test_http_response_send_file() local 52 vb = http_header_response_get(r, HTTP_HEADER_CONTENT_TYPE, in test_http_response_send_file() 54 assert(vb && buffer_eq_slen(vb, CONST_STR_LEN("application/octet-stream"))); in test_http_response_send_file() 61 vb = http_header_response_get(r, HTTP_HEADER_CONTENT_TYPE, in test_http_response_send_file() 63 assert(vb && buffer_eq_slen(vb, CONST_STR_LEN("text/plain"))); in test_http_response_send_file() 64 vb = http_header_response_get(r, HTTP_HEADER_ETAG, in test_http_response_send_file() 66 assert(vb && vb->ptr[0] == '"' && vb->ptr[buffer_clen(vb)-1] == '"'); in test_http_response_send_file() 69 assert(vb); in test_http_response_send_file() 149 vb = http_header_response_get(r, HTTP_HEADER_ETAG, in test_http_response_send_file() 151 assert(vb); in test_http_response_send_file() [all …]
|