@@ -62,41 +62,9 @@ using namespace web::http::details;
62
62
63
63
namespace web { namespace http { namespace client { namespace details
64
64
{
65
- const bool valid_chars [] =
66
- {
67
- 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // 0-15
68
- 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , // 16-31
69
- 0 , 1 , 0 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 1 , 1 , 0 , 1 , 1 , 0 , // 32-47
70
- 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , // 48-63
71
- 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , // 64-79
72
- 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , // 80-95
73
- 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , // 96-111
74
- 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 1 , 0 , 1 , 0 // 112-127
75
- };
76
-
77
65
#ifdef _MS_WINDOWS
78
66
static const utility::char_t * get_with_body = _XPLATSTR(" A GET or HEAD request should not have an entity body." );
79
67
#endif
80
-
81
- #if (!defined(_MS_WINDOWS) || defined(__cplusplus_winrt))
82
- // Checks if the method contains any invalid characters
83
- static bool validate_method (const utility::string_t & method)
84
- {
85
- for (auto iter = method.begin (); iter != method.end (); iter++)
86
- {
87
- char_t ch = *iter;
88
-
89
- if (size_t (ch) >= 128 )
90
- return false ;
91
-
92
- if (!valid_chars[ch])
93
- return false ;
94
- }
95
-
96
- return true ;
97
- }
98
- #endif
99
-
100
68
// Helper function to trim leading and trailing null characters from a string.
101
69
static void trim_nulls (utility::string_t &str)
102
70
{
0 commit comments