/
SoRusV
/
esp32_https_server
Обзор
Документация
Войти
/
SoRusV
/
esp32_https_server
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/HTTPMultipartBodyParser.hpp
39 строк
946 B
Jack Jansen
Squashing all body parser commits to have a reasonable history.
21 фев 2020, 17:31
Не верифицирован
21 фев 2020, 17:31
a341caf
Код
Авторство
О чём код?
#ifndef SRC_HTTPMULTIPARTBODYPARSER_HPP_ #define SRC_HTTPMULTIPARTBODYPARSER_HPP_ #include <Arduino.h> #include "HTTPBodyParser.hpp" namespace httpsserver { class HTTPMultipartBodyParser : public HTTPBodyParser { public: HTTPMultipartBodyParser(HTTPRequest * req); ~HTTPMultipartBodyParser(); virtual bool nextField(); virtual std::string getFieldName(); virtual std::string getFieldFilename(); virtual std::string getFieldMimeType(); virtual bool endOfField(); virtual size_t read(byte* buffer, size_t bufferSize); private: std::string readLine(); void fillBuffer(size_t maxLen); void consumedBuffer(size_t consumed); bool skipCRLF(); bool peekBoundary(); void discardBody(); bool endOfBody(); char *peekBuffer; size_t peekBufferSize; std::string boundary; std::string lastBoundary; std::string fieldName; std::string fieldMimeType; std::string fieldFilename; }; } // namespace httpserver #endif