J. Nick Koston f6bb54486d [web_server_idf] Remove std::string temporaries from multipart header parsing
Refactor multipart utility functions to work with const char* + length
instead of std::string to eliminate temporary heap allocations during
header parsing. The original implementations used std::string for
convenience when the OTA multipart support was first added, but these
can be avoided since the multipart parser already provides raw pointers
and lengths in its callbacks.

- extract_header_param: takes (const char*, size_t, const char*, std::string&)
  instead of (const std::string&, const std::string&) -> std::string.
  Assigns directly to destination, avoiding intermediate string construction.
- str_startswith_case_insensitive: takes (const char*, size_t, const char*)
  instead of (const std::string&, const std::string&)
- str_trim: takes (const char*, size_t, std::string&) instead of
  (const std::string&) -> std::string
- Rename stristr to strcasestr_n with explicit haystack length parameter
  to make the relationship to POSIX strcasestr clear and fix a latent
  buffer over-read risk (stristr relied on null-termination which the
  multipart parser does not guarantee for its callback data)
- process_header_ no longer creates a std::string copy of the raw
  parser buffer before calling utility functions

Saves ~350 bytes of flash.
2026-02-11 16:38:26 -06:00
2023-06-12 17:00:34 +12:00
2022-09-06 15:48:01 +12:00
2025-12-21 09:26:03 -05:00
2024-03-28 10:20:51 +13:00
2025-07-17 22:40:28 +12:00
2025-12-08 14:37:45 -05:00
2026-02-11 08:45:06 +13:00
2025-07-17 22:40:28 +12:00
2025-12-05 08:48:04 -05:00
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme Multiple Licenses 524 MiB
Languages
C++ 64.1%
Python 35.5%
C 0.3%