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
34
34
namespace details
35
35
{
36
36
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
-
63
37
// / <summary>
64
38
// / Helper function to get the default HTTP reason phrase for a status code.
65
39
// / </summary>
66
40
utility::string_t get_default_reason_phrase (status_code code);
67
41
68
42
// 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);
71
43
_ASYNCRTIMP void __cdecl trim_whitespace (utility::string_t &str);
72
44
73
45
bool validate_method (const utility::string_t & method);
74
46
75
-
76
47
namespace chunked_encoding
77
48
{
78
49
// Transfer-Encoding: chunked support
Original file line number Diff line number Diff line change @@ -89,6 +89,36 @@ class status_codes
89
89
#undef DAT
90
90
};
91
91
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
+
92
122
// / Message direction
93
123
namespace message_direction
94
124
{
Original file line number Diff line number Diff line change @@ -72,13 +72,13 @@ utility::string_t get_default_reason_phrase(status_code code)
72
72
}
73
73
74
74
75
- void ltrim_whitespace (utility::string_t &str)
75
+ static void ltrim_whitespace (utility::string_t &str)
76
76
{
77
77
size_t index;
78
78
for (index = 0 ; index < str.size () && isspace (str[index]); ++index);
79
79
str.erase (0 , index);
80
80
}
81
- void rtrim_whitespace (utility::string_t &str)
81
+ static void rtrim_whitespace (utility::string_t &str)
82
82
{
83
83
size_t index;
84
84
for (index = str.size (); index > 0 && isspace (str[index - 1 ]); --index);
You can’t perform that action at this time.
0 commit comments