vodz, last_patch_85

This commit is contained in:
Glenn L McGrath 2003-05-14 12:11:36 +00:00
parent 0a3b0106ab
commit 874e3381db

View File

@ -320,19 +320,6 @@ static void free_config_lines(Htaccess **pprev)
*pprev = NULL; *pprev = NULL;
} }
static void add_config_line(Htaccess **pprev, Htaccess *cur)
{
if(*pprev == NULL) {
*pprev = cur;
} else {
Htaccess *prev;
for(prev = *pprev; prev->next; prev = prev->next)
;
prev->next = cur;
}
}
/* flag */ /* flag */
#define FIRST_PARSE 0 #define FIRST_PARSE 0
#define SUBDIR_PARSE 1 #define SUBDIR_PARSE 1
@ -480,11 +467,30 @@ static void parse_conf(const char *path, int flag)
if(*cf == '/') if(*cf == '/')
free(p0); free(p0);
#endif #endif
if(*cf == 'A' || *cf == 'D') if(*cf == 'A' || *cf == 'D') {
add_config_line(&config->ip_a_d, cur); if(*cf == 'D' && *c) {
/* Deny:form_IP move top */
cur->next = config->ip_a_d;
config->ip_a_d = cur;
} else {
/* add to bottom current IP config line */
Htaccess *prev_IP = config->ip_a_d;
if(prev_IP == NULL) {
config->ip_a_d = cur;
} else {
while(prev_IP->next)
prev_IP = prev_IP->next;
prev_IP->next = cur;
}
}
}
#ifdef CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES #ifdef CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES
else if(*cf == '.') else if(*cf == '.') {
add_config_line(&config->mime_a, cur); /* config .mime line move top for overwrite previous */
cur->next = config->mime_a;
config->mime_a = cur;
}
#endif #endif
#ifdef CONFIG_FEATURE_HTTPD_BASIC_AUTH #ifdef CONFIG_FEATURE_HTTPD_BASIC_AUTH
@ -726,28 +732,21 @@ static void decodeBase64(char *Data)
while (*in) { while (*in) {
int t = *in++; int t = *in++;
switch(t) { if(t >= '0' && t <= '9')
case '+': t = t - '0' + 52;
t = 62; else if(t >= 'A' && t <= 'Z')
break; t = t - 'A';
case '/': else if(t >= 'a' && t <= 'z')
t = 63; t = t - 'a' + 26;
break; else if(t == '+')
case '=': t = 62;
t = 0; else if(t == '/')
break; t = 63;
case 'A' ... 'Z': else if(t == '=')
t = t - 'A'; t = 0;
break; else
case 'a' ... 'z': continue;
t = t - 'a' + 26;
break;
case '0' ... '9':
t = t - '0' + 52;
break;
default:
continue;
}
ch = (ch << 6) | t; ch = (ch << 6) | t;
i++; i++;
if (i == 4) { if (i == 4) {