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

Function ignore_entry

modules/generators/mod_autoindex.c:871–914  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

869}
870
871static int ignore_entry(autoindex_config_rec *d, char *path)
872{
873 apr_array_header_t *list = d->ign_list;
874 struct item *items = (struct item *) list->elts;
875 char *tt;
876 int i;
877
878 if ((tt = strrchr(path, '/')) == NULL) {
879 tt = path;
880 }
881 else {
882 tt++;
883 }
884
885 for (i = 0; i < list->nelts; ++i) {
886 struct item *p = &items[i];
887 char *ap;
888
889 if ((ap = strrchr(p->apply_to, '/')) == NULL) {
890 ap = p->apply_to;
891 }
892 else {
893 ap++;
894 }
895
896#ifndef CASE_BLIND_FILESYSTEM
897 if (!ap_strcmp_match(path, p->apply_path)
898 && !ap_strcmp_match(tt, ap)) {
899 return 1;
900 }
901#else /* !CASE_BLIND_FILESYSTEM */
902 /*
903 * On some platforms, the match must be case-blind. This is really
904 * a factor of the filesystem involved, but we can't detect that
905 * reliably - so we have to granularise at the OS level.
906 */
907 if (!ap_strcasecmp_match(path, p->apply_path)
908 && !ap_strcasecmp_match(tt, ap)) {
909 return 1;
910 }
911#endif /* !CASE_BLIND_FILESYSTEM */
912 }
913 return 0;
914}
915
916/*****************************************************************
917 *

Callers 2

make_parent_entryFunction · 0.85
make_autoindex_entryFunction · 0.85

Calls 2

ap_strcmp_matchFunction · 0.85
ap_strcasecmp_matchFunction · 0.85

Tested by

no test coverage detected