summaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2023-03-26Avoid possible null pointer dereferenceoriginal-cppcflip
This line dereferenced the beginning of a string to read a single char, but it needed a check to make sure there was at least one char to read in the string.
2023-03-26Add support for building on Windowscflip
This makes it possible to compile cfws with Visual Studio. Since winsock and POSIX use very similar APIs, porting is mostly just a matter of placing ifdefs around #includes and functions with slightly different names. However, CGI scripts and command line arguments are not available in this port yet, since they used the Unix-exclusive getopt.h and popen.
2022-09-30Respond with a different content type depending on file extensioncflip
2022-09-20Validate CGI script paths before starting up the servercflip
This still doesn't throw up an error when attepting to run scripts without the leading './', but it's a start
2022-09-19Add ClangTidy configuration and apply fixescflip
2022-09-19Add ClangFormat configuration and reformat filescflip
2022-09-19Implement the PATH_INFO and QUERY_STRING CGI environment variablescflip
This allows scripts to differentiate between the requested path and the query parameters.
2022-09-19Refactor the CGIScript class a bitcflip
This allows the user of the class to set environment variables before opening the pipe to the script.
2022-09-17Call them CGI scripts instead of executablescflip
2022-09-17Make a nice wrapper class for running CGI scriptscflip
2022-09-17Set a few environment variables for CGI scriptscflip
2022-09-17Pass HTTP headers from CGI output into our HttpResponse classcflip
2022-09-15Add an option to serve CGI exectuablescflip
2022-09-15Add simple argument parsing for specifying port numbercflip
2022-09-15Start serving files from the filesystemcflip
2022-07-07Implement simple URI parsing for multiple pagescflip
2022-07-07Reply with a different message and response code depending on languagecflip
2022-07-07Create an HttpRequest classcflip
2022-07-07Add some more abstractions to HttpResponsecflip
2022-07-07Initial commitcflip