MCPcopy Create free account
hub / github.com/apache/httpd / ap_no2slash_ex

Function ap_no2slash_ex

server/util.c:610–638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

608}
609
610AP_DECLARE(void) ap_no2slash_ex(char *name, int is_fs_path)
611{
612
613 char *d, *s;
614
615 if (!*name) {
616 return;
617 }
618
619 s = d = name;
620
621#ifdef HAVE_UNC_PATHS
622 /* Check for UNC names. Leave leading two slashes. */
623 if (is_fs_path && s[0] == '/' && s[1] == '/')
624 *d++ = *s++;
625#endif
626
627 while (*s) {
628 if ((*d++ = *s) == '/') {
629 do {
630 ++s;
631 } while (*s == '/');
632 }
633 else {
634 ++s;
635 }
636 }
637 *d = '\0';
638}
639
640AP_DECLARE(void) ap_no2slash(char *name)
641{

Callers 1

ap_no2slashFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected