| 117 | } |
| 118 | |
| 119 | static bool scHttpHeaderValueIsSafe(SC::StringSpan value) |
| 120 | { |
| 121 | for (char current : value.toCharSpan()) |
| 122 | { |
| 123 | const unsigned char byte = static_cast<unsigned char>(current); |
| 124 | if ((byte < 0x20 and current != '\t') or current == 0x7F) |
| 125 | { |
| 126 | return false; |
| 127 | } |
| 128 | } |
| 129 | return true; |
| 130 | } |
| 131 | } // namespace |
| 132 | |
| 133 | namespace SC |