http_page.h 1011 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef HTTP_PAGE_H_
  2. #define HTTP_PAGE_H_
  3. #include <string>
  4. #include "http_parser.h"
  5. /*
  6. <!DOCTYPE html>
  7. <html>
  8. <head>
  9. <title>404 Not Found</title>
  10. </head>
  11. <body>
  12. <center><h1>404 Not Found</h1></center>
  13. <hr>
  14. </body>
  15. </html>
  16. */
  17. void make_http_status_page(http_status status_code, std::string& page);
  18. /*
  19. <!DOCTYPE html>
  20. <html>
  21. <head>
  22. <title>Index of /downloads/</title>
  23. </head>
  24. <body>
  25. <h1>Index of /downloads/</h1>
  26. <hr>
  27. <pre>
  28. <a href="../">../</a>
  29. <a href="docs/">docs/</a> 2019-08-23 15:27:48 -
  30. <a href="examples/">examples/</a> 2019-08-23 15:27:52 -
  31. <a href="README.txt">README.txt</a> 2019-08-23 19:15:42 0
  32. <a href="release/">release/</a> 2019-08-23 15:28:52 -
  33. </pre>
  34. <hr>
  35. </body>
  36. </html>
  37. */
  38. void make_index_of_page(const char* dir, std::string& page, const char* url = "");
  39. #endif // HTTP_PAGE_H_