diff options
-rw-r--r-- | networking/httpd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index 92a07107d..c8fbefd5a 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -609,10 +609,12 @@ static void parse_conf(const char *path, int flag) | |||
609 | if (*p == '/') { | 609 | if (*p == '/') { |
610 | if (*cf == '/') { /* skip duplicate (or initial) slash */ | 610 | if (*cf == '/') { /* skip duplicate (or initial) slash */ |
611 | continue; | 611 | continue; |
612 | } else if (*cf == '.') { | 612 | } |
613 | if (*cf == '.') { | ||
613 | if (cf[1] == '/' || cf[1] == '\0') { /* remove extra '.' */ | 614 | if (cf[1] == '/' || cf[1] == '\0') { /* remove extra '.' */ |
614 | continue; | 615 | continue; |
615 | } else if ((cf[1] == '.') && (cf[2] == '/' || cf[2] == '\0')) { | 616 | } |
617 | if ((cf[1] == '.') && (cf[2] == '/' || cf[2] == '\0')) { | ||
616 | ++cf; | 618 | ++cf; |
617 | if (p > p0) { | 619 | if (p > p0) { |
618 | while (*--p != '/') /* omit previous dir */; | 620 | while (*--p != '/') /* omit previous dir */; |
@@ -627,8 +629,8 @@ static void parse_conf(const char *path, int flag) | |||
627 | if ((p == p0) || (*p != '/')) { /* not a trailing slash */ | 629 | if ((p == p0) || (*p != '/')) { /* not a trailing slash */ |
628 | ++p; /* so keep last character */ | 630 | ++p; /* so keep last character */ |
629 | } | 631 | } |
630 | *p = '\0'; | 632 | *p = ':'; |
631 | sprintf(p0 + strlen(p0), ":%s", c); | 633 | strcpy(p + 1, c); |
632 | } | 634 | } |
633 | #endif | 635 | #endif |
634 | 636 | ||