From 9f3076bc53860da1c2047692ec79a67b47573fa4 Mon Sep 17 00:00:00 2001 From: Talyx Date: Wed, 9 Feb 2022 17:15:01 +0300 Subject: [PATCH] update: Autoindex class --- src/Autoindex/Autoindex.cpp | 8 ++++---- src/Autoindex/Autoindex.hpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Autoindex/Autoindex.cpp b/src/Autoindex/Autoindex.cpp index 38f81dd..5df7ae9 100644 --- a/src/Autoindex/Autoindex.cpp +++ b/src/Autoindex/Autoindex.cpp @@ -4,7 +4,7 @@ Autoindex::Autoindex() { } -std::string Autoindex::getPage(std::string path, std::string allpath, std::string host) +std::string Autoindex::getPage(std::string path, std::string allpath, std::string host, int port) { DIR *dir = opendir(allpath.c_str()); struct dirent *dirEnt; @@ -31,17 +31,17 @@ std::string Autoindex::getPage(std::string path, std::string allpath, std::strin { tmp = dirEnt->d_name; if (tmp != ".." && tmp != ".") - page = page + getReference(tmp, path, host); + page = page + getReference(tmp, path, host, port); } page += "

\n\n\n"; closedir(dir); return (page); } -std::string Autoindex::getReference(std::string file, std::string dir, std::string host) +std::string Autoindex::getReference(std::string file, std::string dir, std::string host, int port) { std::stringstream link; - link << "\t\t