Skip to content

Commit

Permalink
small corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
ErnestoAvedillo committed Jun 25, 2024
1 parent c686ce7 commit 484ca4b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions conf/simple.conf
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ server:{
root:./www/web4; # root folder of site directory, full or relative path, mandatory parameter
autoindex: on; # cgi-bin folder
index:index.html; # default page when requesting a directory, index.html by default
CGI_folder:./www/web4/cgi/; # cgi-bin folder
CGI_extension:cgi; # cgi-bin folder
# CGI_folder:./www/web4/cgi/; # cgi-bin folder
# CGI_extension:cgi; # cgi-bin folder
};

server:{
Expand Down
2 changes: 1 addition & 1 deletion mandatory/inc/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <sstream>
#include <ctime>
#include <algorithm>
#define MAX_SENT_BYTES 8024
#define MAX_SENT_BYTES 16048 //8024


template <typename T>
Expand Down
4 changes: 2 additions & 2 deletions mandatory/src/Header.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ std::string Header::generateHeader() const
if (lastModified != "")
header += "Last-modified: " + lastModified + "\r\n";
if(contentLength != 0)
header += "Content-length: " + toString(contentLength) + "\r\n";
header += "Content-Length: " + toString(contentLength) + "\r\n";
header += "Content-Type: " + contentType + "\r\n";
for (std::map<std::string, std::string>::const_iterator it = attributes.begin(); it != attributes.end(); ++it)
header += it->first + ": " + it->second + "\r\n";
Expand Down Expand Up @@ -175,7 +175,7 @@ void Header::printReceivedHeader()
std::cout << "Server: " << server << std::endl;
std::cout << "Date: " << date << std::endl;
std::cout << "Last-modified: " << lastModified << std::endl;
std::cout << "Content-length: " << contentLength << std::endl;
std::cout << "Content-Length: " << contentLength << std::endl;
std::cout << "Content-Type: " << contentType << std::endl;
for (std::map<std::string, std::string>::const_iterator it = attributes.begin(); it != attributes.end(); ++it)
std::cout << it->first << ": " << it->second << std::endl;
Expand Down

0 comments on commit 484ca4b

Please sign in to comment.