Blob


1 /** Gemini protocol specifications */
3 #include <array>
5 #pragma once
8 namespace vostok
9 {
10 namespace gemini
11 {
14 constexpr auto MAX_URL_LENGTH = 1024;
15 constexpr auto MAX_META_LENGTH = 1024;
17 extern const std::array<const char, 2> CRLF;
18 extern const std::array<const char, 1> SPACE;
20 using Status = std::array<const char, 2>;
21 extern const Status STATUS_20_SUCCESS;
22 extern const Status STATUS_31_REDIRECT_PERMANENT;
23 extern const Status STATUS_40_TEMPORARY_FAILURE;
24 extern const Status STATUS_42_CGI_ERROR;
25 extern const Status STATUS_50_PERMANENT_FAILURE;
26 extern const Status STATUS_51_NOT_FOUND;
27 extern const Status STATUS_53_PROXY_REQUEST_REFUSED;
28 extern const Status STATUS_59_BAD_REQUEST;
30 constexpr auto MAX_REQUEST_LENGTH = MAX_URL_LENGTH + CRLF.size();
33 } // namespace gemini
34 } // namespace vostok