/
SoRusV
/
esp32_https_server
Обзор
Документация
Войти
/
SoRusV
/
esp32_https_server
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/HTTPHeader.hpp
32 строки
749 B
Frank Hessel
Normalize case of header names. Resolve #73
23 мар 2020, 21:56
Не верифицирован
23 мар 2020, 21:56
c221d22
Код
Авторство
О чём код?
#ifndef SRC_HTTPHEADER_HPP_ #define SRC_HTTPHEADER_HPP_ #include <Arduino.h> #include <string> namespace httpsserver { /** * \brief Represents a single name/value pair of an HTTP header */ class HTTPHeader { public: HTTPHeader(const std::string &name, const std::string &value); virtual ~HTTPHeader(); const std::string _name; const std::string _value; std::string print(); }; /** * \brief Normalizes case in header names * * It converts the first letter and every letter after a non-alnum character * to uppercase. For example, "content-length" becomes "Content-Length" and * "HOST" becomes "Host". */ std::string normalizeHeaderName(std::string const &name); } /* namespace httpsserver */ #endif /* SRC_HTTPHEADER_HPP_ */