commit - 6abda252e960943a302f7a945b1d008e463ea316
commit + cd761624942ce5bd06fcf939400ed41b8166d37d
blob - a25f0a7c69f8d9de6e633204678c9a840a9e81b2
blob + ec44649f16b0fa2b951fc6dee6e1340cb06d3a40
--- server.c
+++ server.c
return NULL;
for (loc = &v->locations[1]; loc->match != NULL; ++loc) {
- if (!fnmatch(loc->match, path, 0)) {
- if (loc->lang != NULL)
+ if (loc->lang != NULL) {
+ if (!fnmatch(loc->match, path, 0))
return loc->lang;
}
}
return default_mime;
for (loc = &v->locations[1]; loc->match != NULL; ++loc) {
- if (!fnmatch(loc->match, path, 0)) {
- if (loc->default_mime != NULL)
+ if (loc->default_mime != NULL) {
+ if (!fnmatch(loc->match, path, 0))
return loc->default_mime;
}
}
return index;
for (loc = &v->locations[1]; loc->match != NULL; ++loc) {
- if (!fnmatch(loc->match, path, 0)) {
- if (loc->index != NULL)
+ if (loc->index != NULL) {
+ if (!fnmatch(loc->match, path, 0))
return loc->index;
}
}
return 0;
for (loc = &v->locations[1]; loc->match != NULL; ++loc) {
- if (!fnmatch(loc->match, path, 0)) {
- if (loc->auto_index != 0)
+ if (loc->auto_index != 0) {
+ if (!fnmatch(loc->match, path, 0))
return loc->auto_index == 1;
}
}
return 0;
for (loc = &v->locations[1]; loc->match != NULL; ++loc) {
- if (!fnmatch(loc->match, path, 0)) {
- if (loc->block_code != 0) {
+ if (loc->block_code != 0) {
+ if (!fnmatch(loc->match, path, 0)) {
*code = loc->block_code;
*fmt = loc->block_fmt;
return 1;
return 0;
for (loc = &v->locations[1]; loc->match != NULL; ++loc) {
- if (!fnmatch(loc->match, path, 0)) {
- if (loc->strip != 0)
+ if (loc->strip != 0) {
+ if (!fnmatch(loc->match, path, 0))
return loc->strip;
}
}