Lines Matching refs:s
395 const char * const s = b->ptr+off; in http_header_remap_host_match() local
411 if (buffer_eq_icase_ss(s, alen, k->ptr, mlen)) { in http_header_remap_host_match()
446 const char * const s = b->ptr+off; in http_header_remap_urlpath() local
452 if (mlen <= plen && 0 == memcmp(s, ds->key.ptr, mlen)) { in http_header_remap_urlpath()
464 if (mlen <= plen && 0 == memcmp(s, ds->value.ptr, mlen)) { in http_header_remap_urlpath()
472 if (mlen <= plen && 0 == memcmp(s, ds->value.ptr, mlen)) { in http_header_remap_urlpath()
489 char *s = b->ptr+off; in http_header_remap_uri() local
495 if (NULL == (s = strchr(s, ':')) || s[1] != '/' || s[2] != '/') return; in http_header_remap_uri()
496 slen = s - (b->ptr+off); in http_header_remap_uri()
497 s += 3; in http_header_remap_uri()
498 off = (size_t)(s - b->ptr); in http_header_remap_uri()
499 if (NULL != (s = strchr(s, '/'))) { in http_header_remap_uri()
500 alen = (size_t)(s - b->ptr) - off; 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()
549 if (*s == '\n') { in http_header_remap_setcookie()
551 s += sizeof("Set-Cookie:"); in http_header_remap_setcookie()
553 if ('\0' == *s) return; in http_header_remap_setcookie()
554 do { ++s; } while (*s == ' ' || *s == '\t'); in http_header_remap_setcookie()
555 if ('\0' == *s) return; in http_header_remap_setcookie()
556 e = s+1; in http_header_remap_setcookie()
557 if ('=' == *s) continue; in http_header_remap_setcookie()
562 switch ((int)(e - s - 1)) { in http_header_remap_setcookie()
564 if (buffer_eq_icase_ssn(s, "path", 4)) { in http_header_remap_setcookie()
574 if (buffer_eq_icase_ssn(s, "domain", 6)) { in http_header_remap_setcookie()
595 static void buffer_append_string_backslash_escaped(buffer *b, const char *s, size_t len) { in buffer_append_string_backslash_escaped() argument
601 int c = s[i]; in buffer_append_string_backslash_escaped()
629 char *s = xff->ptr; in proxy_set_Forwarded() local
632 while (s[i] == ' ' || s[i] == '\t' || s[i] == ',') ++i; in proxy_set_Forwarded()
633 if (s[i] == '\0') break; in proxy_set_Forwarded()
637 } while (s[i]!=' ' && s[i]!='\t' && s[i]!=',' && s[i]!='\0'); in proxy_set_Forwarded()
642 ipv6 = (NULL != memchr(s+j, ':', i-j)); /*(over-simplified) */ in proxy_set_Forwarded()
646 buffer_append_string_backslash_escaped(b, s+j, i-j); in proxy_set_Forwarded()
952 char * restrict s = buffer_extend(b, klen+vlen+4); in proxy_create_env() local
953 s[0] = '\r'; in proxy_create_env()
954 s[1] = '\n'; in proxy_create_env()
955 memcpy(s+2, ds->key.ptr, klen); in proxy_create_env()
956 s += 2+klen; in proxy_create_env()
957 s[0] = ':'; in proxy_create_env()
958 s[1] = ' '; in proxy_create_env()
959 memcpy(s+2, ds->value.ptr, vlen); in proxy_create_env()