ss << "\"";
const std::string& str = stringValue();
for (size_t i = 0; i < str.size(); ++i) {
- const char c = str[i];
+ const signed char c = str[i];
// Escape characters as defined in JSON spec
// Note that we do not escape forward slash; this
// is allowed, but not mandatory.
-// Copyright (C) 2017-2020 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2017-2024 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
}
bool
-HttpMessageParserBase::isChar(const char c) const {
+HttpMessageParserBase::isChar(const signed char c) const {
// was (c >= 0) && (c <= 127)
return (c >= 0);
}
bool
-HttpMessageParserBase::isCtl(const char c) const {
+HttpMessageParserBase::isCtl(const signed char c) const {
return (((c >= 0) && (c <= 31)) || (c == 127));
}
bool
-HttpMessageParserBase::isSpecial(const char c) const {
+HttpMessageParserBase::isSpecial(const signed char c) const {
switch (c) {
case '(':
case ')':
-// Copyright (C) 2017-2020 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2017-2024 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
/// @brief Checks if specified value is a character.
///
/// @return true, if specified value is a character.
- bool isChar(const char c) const;
+ bool isChar(const signed char c) const;
/// @brief Checks if specified value is a control value.
///
/// @return true, if specified value is a control value.
- bool isCtl(const char c) const;
+ bool isCtl(const signed char c) const;
/// @brief Checks if specified value is a special character.
///
/// @return true, if specified value is a special character.
- bool isSpecial(const char c) const;
+ bool isSpecial(const signed char c) const;
/// @brief Reference to the parsed HTTP message.
HttpMessage& message_;