diff --git a/config.yml b/config.yml index 1ff3053..7e44b55 100644 --- a/config.yml +++ b/config.yml @@ -8,12 +8,11 @@ server: host: localhost port: 8080 server_name: example.com - max_cbsize: 2000m # to do: conversion and mapping + max_cbsize: 2000m max_conn: 10 - redirect: /ola # * Root definition - root: / - dir_listing: on + root: /pages + index: index.html http_methods: GET POST # * Error pages map; error_pages: @@ -32,11 +31,10 @@ server: index: favicon.ico # default file to open if the request is the dir dir_listing: off http_methods: GET POST - route /ola: - root: /srcs/conn + route /up: + root: /pages/uploads dir_listing: on http_methods: GET - index: a.cpp Res.cpp Req1.cpp # * CGI routing; route /py: diff --git a/pages/uploads/1716908240039_USER STORY A - Test Cases.docx b/pages/uploads/1716908240039_USER STORY A - Test Cases.docx new file mode 100644 index 0000000..01b5d50 Binary files /dev/null and b/pages/uploads/1716908240039_USER STORY A - Test Cases.docx differ diff --git a/pages/uploads/1716908240046_Test cases.docx b/pages/uploads/1716908240046_Test cases.docx new file mode 100644 index 0000000..668fec8 Binary files /dev/null and b/pages/uploads/1716908240046_Test cases.docx differ diff --git a/pages/uploads/1716908240048_test_cases.docx b/pages/uploads/1716908240048_test_cases.docx new file mode 100644 index 0000000..c7cc3ae Binary files /dev/null and b/pages/uploads/1716908240048_test_cases.docx differ diff --git a/pages/uploads/1716908240051_README.md b/pages/uploads/1716908240051_README.md new file mode 100644 index 0000000..6e13bc8 --- /dev/null +++ b/pages/uploads/1716908240051_README.md @@ -0,0 +1,48 @@ +# Nerd Fonts + +This is an archived font from the Nerd Fonts release v3.1.1. + +For more information see: +* https://github.com/ryanoasis/nerd-fonts/ +* https://github.com/ryanoasis/nerd-fonts/releases/latest/ + +# JetBrains Mono + +JetBrains Mono: a typeface made for developers + +For more information have a look at the upstream website: https://github.com/JetBrains/JetBrainsMono + +Version: 2.304 + +## Which font? + +### TL;DR + +* Pick your font family: + * If you are limited to monospaced fonts (because of your terminal, etc) then pick a font with `Nerd Font Mono` (or `NFM`). + * If you want to have bigger icons (usually around 1.5 normal letters wide) pick a font without `Mono` i.e. `Nerd Font` (or `NF`). Most terminals support this, but ymmv. + * If you work in a proportional context (GUI elements or edit a presentation etc) pick a font with `Nerd Font Propo` (or `NFP`). + +### Ligatures + +Ligatures are generally preserved in the patched fonts. +Nerd Fonts `v2.0.0` had no ligatures in the `Nerd Font Mono` fonts, this has been dropped with `v2.1.0`. +If you have a ligature-aware terminal and don't want ligatures you can (usually) disable them in the terminal settings. + +### Explanation + +Once you narrow down your font choice of family (`Droid Sans`, `Inconsolata`, etc) and style (`bold`, `italic`, etc) you have 2 main choices: + +#### `Option 1: Download already patched font` + + * For a stable version download a font package from the [release page](https://github.com/ryanoasis/nerd-fonts/releases) + * Or download the development version from the folders here + +#### `Option 2: Patch your own font` + + * Patch your own variations with the various options provided by the font patcher (i.e. not include all symbols for smaller font size) + +For more information see: [The FAQ](https://github.com/ryanoasis/nerd-fonts/wiki/FAQ-and-Troubleshooting#which-font) + +[SIL-RFN]:http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web_fonts_and_RFNs#14cbfd4a + diff --git a/pages/uploads/ola.png b/pages/uploads/ola.png new file mode 100644 index 0000000..99185c0 Binary files /dev/null and b/pages/uploads/ola.png differ diff --git a/srcs/conn/Res.cpp b/srcs/conn/Res.cpp index b988884..23ba0c6 100644 --- a/srcs/conn/Res.cpp +++ b/srcs/conn/Res.cpp @@ -328,17 +328,17 @@ int Res::exec_post(void) if (stream->server->cgi_path.find(FileManager::set_file_ext(name)) != stream->server->cgi_path.end()) { req->file_path = "./" + name; req->file_ext = FileManager::set_file_ext(req->file_path); + std::cout << "AAAAAAAAAA" << std::endl; return (exec_CGI()); } } - else - throw HttpError("404", "Not Found"); } if (content_type.find("multipart/form-data;") != 1) throw HttpError("406", "We can't execute this type of request"); boundary = get_boundary(content_type); + std::cout << "file_path: " << req->file_path << std::endl; DIR* dir = opendir(req->file_path.c_str()); if (!dir) throw HttpError("500", "Internal Server Error");