File tree Expand file tree Collapse file tree 3 files changed +32
-31
lines changed Expand file tree Collapse file tree 3 files changed +32
-31
lines changed Original file line number Diff line number Diff line change @@ -34,45 +34,16 @@ namespace web { namespace http
3434namespace details
3535{
3636
37- // / <summary>
38- // / Constants for MIME types.
39- // / </summary>
40- class mime_types
41- {
42- public:
43- #define _MIME_TYPES
44- #define DAT (a,b ) _ASYNCRTIMP const static utility::string_t a;
45- #include " cpprest/details/http_constants.dat"
46- #undef _MIME_TYPES
47- #undef DAT
48- };
49-
50- // / <summary>
51- // / Constants for charset types.
52- // / </summary>
53- class charset_types
54- {
55- public:
56- #define _CHARSET_TYPES
57- #define DAT (a,b ) _ASYNCRTIMP const static utility::string_t a;
58- #include " cpprest/details/http_constants.dat"
59- #undef _CHARSET_TYPES
60- #undef DAT
61- };
62-
6337 // / <summary>
6438 // / Helper function to get the default HTTP reason phrase for a status code.
6539 // / </summary>
6640 utility::string_t get_default_reason_phrase (status_code code);
6741
6842 // simple helper functions to trim whitespace.
69- _ASYNCRTIMP void __cdecl ltrim_whitespace (utility::string_t &str);
70- _ASYNCRTIMP void __cdecl rtrim_whitespace (utility::string_t &str);
7143 _ASYNCRTIMP void __cdecl trim_whitespace (utility::string_t &str);
7244
7345 bool validate_method (const utility::string_t & method);
7446
75-
7647 namespace chunked_encoding
7748 {
7849 // Transfer-Encoding: chunked support
Original file line number Diff line number Diff line change @@ -89,6 +89,36 @@ class status_codes
8989#undef DAT
9090};
9191
92+ namespace details {
93+
94+ // / <summary>
95+ // / Constants for MIME types.
96+ // / </summary>
97+ class mime_types
98+ {
99+ public:
100+ #define _MIME_TYPES
101+ #define DAT (a,b ) _ASYNCRTIMP const static utility::string_t a;
102+ #include " cpprest/details/http_constants.dat"
103+ #undef _MIME_TYPES
104+ #undef DAT
105+ };
106+
107+ // / <summary>
108+ // / Constants for charset types.
109+ // / </summary>
110+ class charset_types
111+ {
112+ public:
113+ #define _CHARSET_TYPES
114+ #define DAT (a,b ) _ASYNCRTIMP const static utility::string_t a;
115+ #include " cpprest/details/http_constants.dat"
116+ #undef _CHARSET_TYPES
117+ #undef DAT
118+ };
119+
120+ }
121+
92122// / Message direction
93123namespace message_direction
94124{
Original file line number Diff line number Diff line change @@ -72,13 +72,13 @@ utility::string_t get_default_reason_phrase(status_code code)
7272}
7373
7474
75- void ltrim_whitespace (utility::string_t &str)
75+ static void ltrim_whitespace (utility::string_t &str)
7676{
7777 size_t index;
7878 for (index = 0 ; index < str.size () && isspace (str[index]); ++index);
7979 str.erase (0 , index);
8080}
81- void rtrim_whitespace (utility::string_t &str)
81+ static void rtrim_whitespace (utility::string_t &str)
8282{
8383 size_t index;
8484 for (index = str.size (); index > 0 && isspace (str[index - 1 ]); --index);
You can’t perform that action at this time.
0 commit comments